<!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 mymessage=confirm("你確定要打開新窗口嗎?");?????? if(mymessage==true)?????? {var mynum=prompt("輸入網(wǎng)址:","http://idcbgp.cn/");?????? if(mynum!=null)?????? {window.open('mynum','_blank','width=400,height=500,menubar=no,toolbar=no,status=yes,scrollbars=yes');}?????? ?????? else{alert("返回");}?????? else{alert("返回");}?}? ??? ? </script> ?</head> ?<body> ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" /> ?</body></html>
用這段代碼打開新窗口總顯示無法訪問,能幫我看看這段代碼有什么問題嗎?
慕粉4078561
2016-10-06 11:13:53