哪里有問題啊,有大佬幫忙看看嗎,點那個按鈕沒反應(yīng)!!
<script type="text/javascript">??
? ? function openWindow()
? ? {var open=confirm("你確定要打開新網(wǎng)頁嗎?");
? ? ? ? // 新窗口打開時彈出確認(rèn)框,是否打開
? ? ? ? if(open==true)
? ? ? ? {var url=prompt("請輸入網(wǎng)址:"," http://idcbgp.cn/");
? ? ? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? ? ? ? ? if(url!=null)
? ? ? ? ? ? ? ? {window.open('http://idcbgp.cn/','_blank','width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? ? ? ? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。? ? ? ??
? ? ? ? ? ? ? ? }
? ? ? ? ? ? else
? ? ? ? ? ? {alert("bye");
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? else
? ? ? ? {alert("bye");
? ? ? ? }
? ? }??
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2020-01-15
怎么解決的0.0
2019-11-20
解決了