請問一下為什么沒看到效果,哪兒錯了?
<html>
<head>
?<title> new document </title> ?
?<meta http-equiv="Content-Type" content="text/html; charset=gbk"/> ?
?<script type="text/javascript"> ?
? ?function openWindow(){
? ?// 新窗口打開時彈出確認框,是否打開
? ?var a=comfirm("確認打開網址?");
? ?// 通過輸入對話框,確定打開的網址,默認為 http://www.xianlaiwan.cn/
? ?if(a==true){
? ? ? ?var b=prompt("網址:","www.xianlaiwan.cn");
? ?//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。
? ? ? ? if(b!=null){
? ? ? ?window.open(b,"_blank","width=400px,height=500px,menubar=no ? ? ? ? ? ,toolbar=no");
? ? ? ?}else{
? ? ? ? ? ?alert("1");
? ? ? ? ? ?}
? ?}else{
? ? ? ?alert("2");
? ? ? ?}
? ?}
?</script>
</head>
<body>
?<input type="button" value="新窗口打開網站" onclick="openWindow()" />
</body>
</html>
2015-12-15
?var a=comfirm("確認打開網址?");中的conform寫錯了不是'm'是'n'