<!DOCTYPE html><html> <head> <title> new document </title> <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> <script type="text/javascript"> function openwindow(){ var open=confirm("您确定打开网址么?"); if(open==true){ var my=prompt("请输入您想访问的网址","http://www.baidu.com"); if(my!=null){ window.open(my,"_blank",'height=400px,width=500px,menubar=no,toolbar=no'); } else{ alert("拜拜了您!"); } } else{ alert("拜拜了您!"); } </script> </head> <body> <input type="button" value="新窗口打开网站" onclick="openWindow()" /> </body></html>
添加回答
举报
0/150
提交
取消