新窗口打不開,請問是哪里出問題了呢?求大佬指正
<!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 yi=confirm("確認(rèn)打開網(wǎng)頁?");
? ? if(yi==true)
? ? {window.open('http://idcbgp.cn/',"_blank","width=400,height=500,menubar=no,toolbar=no")};
? ? else
? ? {alert("打開失敗")};
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? };
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2019-02-06
charset=utf-8? 試試
2019-02-03
有些符號有些問題?仔細(xì)看看就知道了
2019-02-01
<!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 ms=confirm("是否打開新的窗口");
? ? ? ?if(ms=true){
? ? ? ? ?window.open("http://idcbgp.cn/","_blank","width=400px,height=500px")?
? ? ? ?}else{
? ? ? ? ? ?document.write("不打開任何窗口")
? ? ? ?}
? }
? ??
? ? // 新窗口打開時(shí)彈出確認(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-01-31