點了按鈕沒有反應(yīng)
<!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 mystyle = confirm("你確定要打開慕課網(wǎng)嗎?");
? ? ? ? if (mystyle==ture) ? ? ? ? ?
? ? ? ? ? ? {var url=prompt("是否要打開網(wǎng)址?","http://idcbgp.cn");
? ? ? ? ? ? if(url!==null)
? ? ? ? ? ? ? ? {window.open(url,'_blank','width=400px,height=500px,menubar=no,toolbar=no,status=no,scrollbars=yes');}
? ? ? ? ? ? else
? ? ? ? ? ? ? ? {alert(再見!地球人!);}
? ? ? ? ? ? ? ?}
? ? ? ? else
? ? ? ? ? ? {alert(再見!地球人!);}
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2016-07-18
alert中輸出字符串要用引號 然后你的true拼錯了 括號不知道有沒有括錯 你沒有縮進我實在看不清
2016-07-18
我感覺是你的prompt使用有誤
2016-07-18
打錯了字true打成了ture
2016-07-18
你想打開網(wǎng)頁的路徑?jīng)]有添加。