我怎么關(guān)閉不了?
<script?type="text/javascript"> function?rec(){ ?var?mywin?=?window.open("http://idcbgp.cn"); ?var?win?=?confirm("關(guān)閉?"); ?if(win?==?true){ ??mywin.close(); ?}else{ ??alert("不關(guān)"); ?} } </script> </head> <body> ?<input?name="buton"?type="button"?value="點(diǎn)擊老夫"?onclick="rec()"?/> </body>
2016-01-22
你代碼沒錯(cuò),點(diǎn)了確定就可以關(guān)閉了
2016-01-22
?你要先搞明白,關(guān)閉的是新打開的imooc的標(biāo)簽頁,點(diǎn)確定后會(huì)關(guān)閉的