幫忙看看吧
<!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 open1 = confirm("確認(rèn)打開新窗口嗎?");
? ? ? ? if(open1==true){
? ? ? ? ? ? var url = prompt("請輸入地址","http://idcbgp.cn");
? ? ? ? ? ? if(url!=null){
? ? ? ? ? ? ? ? window.open(url,"_blank",'height=500px,width=400px,menubar=no,toolbar=no');
? ? ? ? ? ? }
? ? ? ? ? ? else{
? ? ? ? ? ? ? ? alert("我很抱歉");
? ? ? ? ? ? }
? ? ? ? }
? ? ? ? else{
? ? ? ? ? ? alert("你是豬嗎?");
? ? ? ? }
? ? }
? ??
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
為什么網(wǎng)址打不開??。。。。
2015-12-24
是不是用的IE瀏覽器啊,換谷歌試試
2015-12-24
應(yīng)該是你阻止了彈出提示或者禁用JS,前者可能性大
2015-12-24
被你的瀏覽器阻止了