為什么運行不了?求大神指點
<!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("確認新建窗口打開網站嗎?");
? ? ? ? if(open==true)
? ? ? ? {var url=prompt("請輸入你的網址:","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="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
2017-02-24
兩處錯誤
? {var url=prompt("請輸入你的網址:","? //應該是英文的逗號,
?? {alert("再見!");} //應該是英文的逗號,