大神來看下,沒看懂這段代碼不能運(yùn)行的原因在哪
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
function foo(){
? ? var bli=confirm('確定打開新世界的大門嗎?');
? ? if (bli==ture)
? ? ? ? ? ? {var url=prompt("在下面網(wǎng)址輸入key就可以啦",'http://www.bilibili.com/');
? ? ? ? ? ? if (url!=null)
? ? ? ? ? ? {window.open(url,'_blank','width=400,height=500,menubar=no,toolbar=no');}
? ? ? ? else {alert('prompt關(guān)閉');}
? ? else {alert('confirm關(guān)閉');}
? ? }}
? </script>?
?</head>?
?<body>?
?<input type="button" value="打開新世界的大門" onclick="foo()" />?
?</body>
</html>
2016-10-16
true寫錯(cuò)了