為什么我的第一個確認打開新網(wǎng)頁點擊“取消”后還會彈出“輸入對話框”啊
<script?type="text/javascript">?? ???function?openWindow()?{ ????var?a=confirm("確認打開新網(wǎng)頁?");//?新窗口打開時彈出確認框,是否打開 ????if(a=true) ????{var?b=prompt("確認打開的網(wǎng)址為","http://idcbgp.cn") ????//?通過輸入對話框,確定打開的網(wǎng)址,默認為?http://idcbgp.cn/ ????if(b!=null) ????{window.open(b,"_blank","width=400,height=500,menubar=no,status=no")//打開的窗口要求,寬400像素,高500像素,無菜單欄、無工具欄。 ????} ?????} ??????} ????</script>
2015-10-13
if(a==true);少了個=