請(qǐng)問各位大佬為什么不能跳轉(zhuǎn)到網(wǎng)站頁(yè)面?
<!DOCTYPE html>
<html>
<head>
<title> new document </title> ?
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> ??
<script type="text/javascript"> ?
function openWindow(){
? ?var miss=confirm("是否確定");
? ?if(miss==ture){
? ? ? ?var zz=prompt("輸入網(wǎng)站","http://idcbgp.cn/");
? ? ? ?if(zz!=null){
? ? ? ? ? ?window.open("http://idcbgp.cn/","_blank","width:400px,height:500px");
? ? ? ?}
? ? ? ?else
? ? ? ?{
? ? ? ? alert("網(wǎng)址不存在");
? ? ? ?}
}?
else
? ?{
? ? ? ?alert("再見");
? ?}
}
</script>?
</head>?
<body>?
<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
</body>
</html>
2018-09-07
??if(miss==ture)? 這是true,輸入有誤,其他的都對(duì)的。
2018-09-11