<!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?mywin=confirm("你是春哥?");
????if(mywin==true)
????{???var?url=("http://idcbgp.cn/")
????????window.open(?url,"_blank","width=400,height=500,menubar=no,toolbar=no");
????????
????}
????
????else
????{
????????alert("不理你");
????}
}//?新窗口打開時彈出確認(rèn)框,是否打開
????//?通過輸入對話框,確定打開的網(wǎng)址,默認(rèn)為?http://idcbgp.cn/
????//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
????
????
??</script>?
?</head>?
?<body>?
??<input?type="button"?value="新窗口打開網(wǎng)站"?onclick="openWindow()"?/>?
?</body>
</html>
2017-02-28
var?url=("http://idcbgp.cn/");http后面的冒號用英文的,這看不懂?
2017-03-11
剛我復(fù)制的說明里的連接,打開也是空白,改了冒號就行了
2017-02-28
在網(wǎng)址http后面的冒號用英文的就可以了,不要用中文的。