為什么我的結(jié)果顯示不出來(lái)呀?不彈出網(wǎng)頁(yè)。。代碼如下。。
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ? // 新窗口打開(kāi)時(shí)彈出確認(rèn)框,是否打開(kāi)
? ? // 通過(guò)輸入對(duì)話框,確定打開(kāi)的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? function openWindow();
? ? {
? ? ? var openwin=confirm("是否打開(kāi)新網(wǎng)址?");
? ? ? if(openwin==true)
? ? //打開(kāi)的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
? ? ? {
? ? ? ? var openwindows=prompt("請(qǐng)輸入網(wǎng)址:","http://www.baidu.com/");
? ? ? ? if (openwindows!=null)
? ? ? ? {
? ? ? ? ? window.open(openwindows,'_blank','width=400px,heigth=500px,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? alert("再見(jiàn)!");
? ? ? ? }
? ? ? }
? ? ? else
? ? ? {
? ? ? ? ?alert("再見(jiàn)!");
? ? ? }
? ? ?}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2017-01-23
? ? function openWindow() 后面不要加分號(hào)
2017-02-03
????我沒(méi)加分號(hào)呀 也不行