<!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 a=confirm("是否需要打開一個窗口?");? ? ?if (a==true){? ? ? var url=prompt("通過輸入對話框,確定打開的網址","http://idcbgp.cn");? ? ?}? ? ? ? ?if (url!=null){? ? ? ? ? ? ?window.open (url,'_blank','width=400px,height=500px,menubar=0,toolbar=0');? ? ? ? ? ? ?}? ? ? ? ?else {alert("再見!");}? ? ?else {alert("再見!");}? ? }? </script>??</head>??<body>? ?<input type="button" value="新窗口打開網站" onclick="openWindow()" />??</body></html>
找不到錯誤啦..>_<
qq_廉政_0
2016-04-22 20:39:07