為什么打不開
<!DOCTYPE html>
<html>
?<head>
? <title> new document </title> ?
? <meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ??
? <script type="text/javascript"> ?
function p()
{var open=confirm("確認新建窗口打開網站嗎?");
if(open==true)
{var ur=prompt("通過輸入對話框,確定打開的網址","http://www.xianlaiwan.cn");
if(ur!=null)
window.open("ur""blank""width=400px,heighr=500px,menubar=no,toolbar=no");
else
alert("再見!");
} ??
else
{alert("再見!");}
}
?</script>?
?</head>?
?<body>?
<input type="button"onclick="p()" value="新窗口打開新網站" ?/>?
?</body>
</html>
為什么運行不了??????????????????明明挺對的,求大神解答
2015-01-19
window.open("ur""blank""width=400px,heighr=500px,menubar=no,toolbar=no");
改為window.open(ur,"_blank","width=400px,heighr=500px,menubar=no,toolbar=no");