我怎么关闭不了?
<script type="text/javascript"> function rec(){ var mywin = window.open("http://www.imooc.com"); var win = confirm("关闭?"); if(win == true){ mywin.close(); }else{ alert("不关"); } } </script> </head> <body> <input name="buton" type="button" value="点击老夫" onclick="rec()" /> </body>