為什么運(yùn)行不了?求大神指點(diǎn)
<!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 open=confirm("確認(rèn)新建窗口打開網(wǎng)站嗎?");
? ? ? ? if(open==true)
? ? ? ? {var url=prompt("請(qǐng)輸入你的網(wǎng)址:","http://www.baidu.com");
? ? ? ? ? ? if(url!==null)
? ? ? ? ? ? {window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');}
? ? ? ? ? ? else
? ? ? ? ? ? {alert("再見!");}
? ? ? ? ? ??
? ? ? ? }
? ? else
? ? {alert("再見啦");}
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2017-02-24
兩處錯(cuò)誤
? {var url=prompt("請(qǐng)輸入你的網(wǎng)址:","? //應(yīng)該是英文的逗號(hào),
?? {alert("再見!");} //應(yīng)該是英文的逗號(hào),