求幫我看看哪里出問題了??
<!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 wopen=confirm("是否打開?");
? ? if(wopen==true)
? ? {
? ? var isopen=prompt("請(qǐng)輸入要打開的網(wǎng)址:","http://idcbgp.cn");
? ? ? ? if(isopen!=null)
? ? ? ? {
? ? ? ? window.open(isopen,"_blank",'width=400,height=500 ? ? ? ?,manubar=no,toolbar=no')
? ? ? ??
? ? ? ? }
? ? ? ? else{alert("再見!")}
? ??
? ? }
? ? else{alert("再見!")}
? ??
}
? ? // 新窗口打開時(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>
2015-12-17
<title>和<meta>換下位置,初學(xué)代碼應(yīng)該寫標(biāo)準(zhǔn)點(diǎn),manubar拼寫錯(cuò)誤 ?應(yīng)是menubar,解決亂碼,把charset=gbk換成charset=utf-8
2015-12-17
代碼沒問題的,你把它放到本地用chrome測(cè)試一下,應(yīng)該是可以的
2015-12-17
你的瀏覽器攔截新窗口了吧?很多瀏覽器都是默認(rèn)攔截新窗口的,設(shè)置一下就好了
2015-12-17
好像沒什么問題,可能是在線驗(yàn)證出了問題,有時(shí)候會(huì)有誤判的