看不出來我哪兒錯了啊 求大神幫忙啊
<!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 message=confirm("是否打開?");
? ? ? if(message==true)
? ? ? ? ?{ var mis=prompt("你確定要打開網(wǎng)站嗎?","http//www.baidu.com");
? ? ? ? ? if(mis!=null)
? ? ? ? ? ? ? {window.open(mis,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
? ? ? ? ??
? ? ? ? ? else
? ? ? ? ? {alert("再見");}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-12-29
修改后:
<!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 message=confirm("是否打開?");
? ? ? if(message==true)
? ? ? ? ?{ var mis=prompt("你確定要打開網(wǎng)站嗎?","http://www.baidu.com");
? ? ? ? ? if(mis!=null)
? ? ? ? ? ? ? {window.open('http://www.baidu.com',"_blank",'width=400px,height=500px,menubar=no,toolbar=no,scrollbars=yes');}
? ? ? ? ??
? ? ? ? ? else
? ? ? ? ? {alert("再見");}
}
}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-12-28
?function openWindow()
? ? ?{ var message=confirm("是否打開?");
? ? ? if(message==true)
? ? ? ? ?{ var mis=prompt("你確定要打開網(wǎng)站嗎?","http//www.baidu.com");
? ? ? ? ? if(mis!=null)
? ? ? ? ? ? ? {window.open(mis,'_blank','width=400px,height=500px,menubar=no,toolbar=no');}
}
? ? ? ? ? else
? ? ? ? ? {alert("再見");}
}
? {} ?大括號括的地方不對。。。
? ? ?{ var message=confirm("是否打開?"); ? ? 這一行最后的分號應(yīng)該是英文的; 你用的中文
"_blank" 這么寫不知道對不對 前面教的是'blank'