大家?guī)臀铱匆豢村e在哪里吧,我思維好換亂。。。
<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("are u sure to open this url?")
? ? ? ? if(open==ture){prompt("are u sure to open the defalut url?","http://idcbgp.cn/") window.open("http://idcbgp.cn/","_blank","width=400,height=500,menubar=no,toolbar=no,scrollbars=no")}
? ? ? ? else{alert("bye!")}
? ? ? ? ?}
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-08-03
這里是true,不是ture
2015-08-03
干嘛這樣寫?confirm自帶一個返回值,if(open)就可以