對話框無反應(yīng),看了好久都沒找出來問題,大家?guī)蛶兔?/h1>
<!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==ture)
{var url=prompt
("是否打開網(wǎng)址","http://idcbgp.cn");
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>
<!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==ture)
{var url=prompt
("是否打開網(wǎng)址","http://idcbgp.cn");
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>
2020-04-07
哥哥? open==true ? 你寫的是ture