代碼不能運行,誰幫忙看看!
<!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 open = confirm("是否打開網(wǎng)頁?");
? ? if (open == true)
? ? {
? ? var url = prompt ("請輸入要打開的網(wǎng)址","http://idcbgp.cn/");
? ? if (url ! = null)?
? ? {
? ? ? ?window.open(url,"_blank",'width=400px,height=500px,menubar=no,toolbar=no') ;
? ? }
? ? else?
? ? {
? ? alert("再見!");
? ? }
? ? }
? ? else
? ? {
? ? alert("再見!");
? ? }
? ? }
? </script>?
?</head>?
?<body>?
?<input type="button" value="新窗口打開網(wǎng)站" onclick="openWindow()" />?
?</body>
</html>
2015-11-25
if(url != null) 感嘆號和等號之間不要有空格