怎么窗口打不開
<!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 open=confirm("是否打開新窗口?");
? ? ? ?
? ? // 新窗口打開時(shí)彈出確認(rèn)框,是否打開
? ? ? ? if(open=true){
? ? ? ? ? ? var openw=prompt("打開的網(wǎng)址為:","http://idcbgp.cn/");
? ? ? ? ? ??
? ? // 通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為 http://idcbgp.cn/
? ? ? ? ? ? window.open('http://idcbgp.cn/','width=400','height=500');
? ? //打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? }
? ? } ? ? ??
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-10-13
網(wǎng)址里面不能是中文字符,請檢查你的http://idcbgp.cn/這個(gè)網(wǎng)址,冒號是中文的了,改為英文就可以了
2015-10-13
=是賦值的意思,==才是等于