請指點(diǎn)下,都無法彈出,具體哪出錯了?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>??
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>? ?
? <script type="text/javascript">??
? ? var a=confirm("是否打開新窗口?");
? ? // 新窗打開時彈出確認(rèn)框,是否打開
? ? if(a==true)
? ? {
? ? ? ? var b=prompt("確認(rèn)網(wǎng)址:", "http://idcbgp.cn/");
? ? ? ? if(b!=null)
? ? ? ? {
? ? ? ? ? ? window.open('http://idcbgp.cn/','_blank','width=400,height=500,menubar=no,toolbar=no');
? ? ? ? }
? ? ? ? else
? ? ? ? {
? ? ? ? ? ? alert("bye!");
? ? ? ? }
? ? }
? ? else
? ? {
? ? ? ? alert("bye!");
? ? }
? ? ? ?</script>?
?</head>?
?<body>
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-08-02
后面要用到onclick="openwindow()",你的代碼中openwindow()函數(shù)在哪?
2018-08-02
?不彈的問題是:var a=confirm("是否打開新窗口?");
后面的冒號不對
2018-08-02
http://idcbgp.cn/
http://idcbgp.cn/
2018-08-01
那個慕課的網(wǎng)址:好像是中文的
2018-08-01
你沒寫openWindow()方法