新跳的網(wǎng)頁(yè)怎么打不開
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
? ? ? ? var ins=prompt("shifoudakai","http://idcbgp.cn/");
? ? ? ? if(ins!=null){
? ? ? ? ? ??
? ? ? ? ? ?window.open(ins,"_blank",'width=400px,height=500px,menubar=no,toolbar=no'); ? ?
? ? ? ? }
? ??
? ??
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ? // 通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無(wú)菜單欄、無(wú)工具欄。
? ??
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2018-07-23
謝謝,謝謝
2018-07-22
注意細(xì)節(jié),你的function openWindow(){ }都沒寫,把你代碼放到這里面才有效。原因就是找不到該方法
2018-07-21
就我檢查發(fā)現(xiàn)的問題:
你的地址輸入冒號(hào)不是英文輸入。正確應(yīng)該是 http://idcbgp.cn
window.open(ins,"_blank",'width=400px','height=500px','menubar=no','toolbar=no'),你輸入的是只用兩個(gè)單引號(hào)把后邊的參數(shù)全部包括真的可以么?
別的沒了,謝謝。