為啥出不來(lái)我想要的
<!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 queren=confirm("是否打開(kāi)網(wǎng)頁(yè)");
? ? ? ? if (queren==ture)
? ? ? ? {
? ? ? ? ? ? var wocaozenmebuxing = prompt ("確認(rèn)打開(kāi)的網(wǎng)址","http://idcbgp.cn/");
? ? ? ? ? ? if( wocaozenmebuxing != null)
? ? ? ? ? ? {
? ? ? ? ? ? ? ? window.open(wocaozenmebuxing,"_blank",'width=400px,height=500px,menubar=no,toolbar=no');
? ? ? ? ? ? }
? ? ? ? ? ? else{}
? ? ? ? }
? ? ? ? else{}
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開(kāi)網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-10-30
是true,不是ture
這一句冒號(hào)錯(cuò)了,改成英文分號(hào)
修改后的全代碼
2015-10-30
額。。。queren==ture ? true打錯(cuò)了。。。