新跳的網頁怎么打不開
<!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://www.xianlaiwan.cn/");
? ? ? ? if(ins!=null){
? ? ? ? ? ??
? ? ? ? ? ?window.open(ins,"_blank",'width=400px,height=500px,menubar=no,toolbar=no'); ? ?
? ? ? ? }
? ??
? ??
? ? // 新窗口打開時彈出確認框,是否打開
? ? // 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ??
? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網站" onclick="openWindow()" />?
?</body>
</html>
2018-07-23
謝謝,謝謝
2018-07-22
注意細節,你的function openWindow(){ }都沒寫,把你代碼放到這里面才有效。原因就是找不到該方法
2018-07-21
就我檢查發現的問題:
你的地址輸入冒號不是英文輸入。正確應該是 http://www.xianlaiwan.cn
window.open(ins,"_blank",'width=400px','height=500px','menubar=no','toolbar=no'),你輸入的是只用兩個單引號把后邊的參數全部包括真的可以么?
別的沒了,謝謝。