請(qǐng)問(wèn)為什么彈不出對(duì)話框?
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title>?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/>??
? <script type="text/javascript">?
??? function opeWindow(){
??????? var insure=confirm("確認(rèn)打開(kāi)新窗口嗎?");
??????? //彈出對(duì)話框,是否打開(kāi)
??????? if(insure==true){
??????????? var newwin=prompt("輸入打開(kāi)的網(wǎng)址:","http://idcbgp.cn/");
??????? //輸入對(duì)話框,確定打開(kāi)網(wǎng)站,默認(rèn)http://idcbgp.cn/?
??????????? if(newwin!=null){window.open('newwin','width=400,height=500,menubar=no,toolbar=no');
??????????? }
??????? //打開(kāi)的窗口要求。
??????? }
??????? else return null;
??? }
? </script>
?</head>
?<body>
?? <input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2018-07-10
不用啦 我找到問(wèn)題了,我前面函數(shù)名打錯(cuò)了,后面沒(méi)有辦法調(diào)用 ?
2018-07-10
有個(gè)分號(hào)的中文的,我改成英文后還是不能彈出對(duì)話框