為什么我的第一個(gè)確認(rèn)打開新網(wǎng)頁(yè)點(diǎn)擊“取消”后還會(huì)彈出“輸入對(duì)話框”啊
<script?type="text/javascript">?? ???function?openWindow()?{ ????var?a=confirm("確認(rèn)打開新網(wǎng)頁(yè)?");//?新窗口打開時(shí)彈出確認(rèn)框,是否打開 ????if(a=true) ????{var?b=prompt("確認(rèn)打開的網(wǎng)址為","http://idcbgp.cn") ????//?通過輸入對(duì)話框,確定打開的網(wǎng)址,默認(rèn)為?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);少了個(gè)=