<!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 asd=confirm("單擊確定打開網(wǎng)頁窗口");? ? ? ? if(asd==true){? ? ? ? ? ? ? ? ? ? ? var qwe=prompt("輸入網(wǎng)址")? ? ? ? ? ? ? ? ? ? ? if(qwe!=null){? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? window.open("http://idcbgp.cn","_blank","width=400,heiht=500,toolbar=no,menubar=no,scrollbars=no,status=no";}? ? ? ? ? ? ? ? ? ? ? else if(qwe==""){? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?alert("未輸入網(wǎng)址")}? ? ? ? ? ? ? ? ? ? ? else if(qwe==null){? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?alert("請輸入網(wǎng)址")}}? ? ? ? else{? ? ? ? ? ? ?alert("可惜")}}? </script>??</head>??<body>? ?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />??</body></html>
這個(gè)代碼有什么問題?為什么點(diǎn)擊按鈕無反應(yīng)。
玉鴦子
2016-09-10 12:34:45