为什么这样子弹出两个窗口之后只能关闭一个?(浏览器是火狐)
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
<script type="text/javascript">
var mywin=window.open("http://www.imooc.com");
var pages=confirm("choose to close the window");
if(pages == 1){
mywin.close();
alert("window has been closed");
}
else{
alert("window has NOT been closed!");
}
</script>
</head>
<body>
</body>
</html>