求大神看看為什么不能運(yùn)行
<!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 mychar=confirm("是否打開新窗口");
??????? if(mychar==true)
??????? {var input= prompt("輸入要打開的網(wǎng)站",'http://idcbgp.cn/');
??????????? window.open('_blank','width:400','height:500',menubar=no,toolbar=no)};
??????? else
??????? {alert="再見"};
?????? ?
??? }
??? // 新窗口打開時彈出確認(rèn)框,是否打開
??? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
??? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
?? ?
?? ?
? </script>
?</head>
?<body>
?? ?? <input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />
?</body>
</html>
2019-02-13
?function openWindow()
? {
? ? ? var lz=confirm("打開網(wǎng)址嗎?");
? ? ??
? ? ? if(lz==true)
? ? ? {
? ? ? ? ? var lzz;
? ? ? ? ? lzz=prompt("網(wǎng)址",'http://idcbgp.cn/');
? ? ? ? ? window.open(lzz,'_blank','width=400px,height=500px,menubar=no,toolbar=no');
? ? ? }
? }
2019-02-10
? ? function openWindow(){
? ? ? ? var a=confirm("是否打開");
? ? ? ? if(a==true){
? ? ? ? var b=prompt("要打開的網(wǎng)址","http://idcbgp.cn/");
? ? ? ? window.open(b,'_blank','width=400,height=500,nenubar=no,toolbar=no');?
? ? ? ? }
? ? }
自己對照一下吧