點圖標沒反應,彈不出窗口,求大神幫忙~~~
<!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 mes=confirm("是否點擊確定?")
? ? // 新窗口打開時彈出確認框,是否打開
if(mes==true)
? ? {var mes2=prompt("確定打開的網(wǎng)址","http://idcbgp.cn/");
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認為 http://idcbgp.cn/
if(mes2!=null)
? ? {window.open(mes2,"_blank","width=400,height=500,menbar=no,toolbar=no");}
? ?}
?}
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
??
? ??
? </script>?
?</head>?
?<body>?
? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2020-01-15
????{var?mes2=prompt("確定打開的網(wǎng)址","http://idcbgp.cn/"); 這一句話"確定打開網(wǎng)址"后面的逗號寫成了中文符?