关闭已打开的窗口。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>window.open(打开新窗口 )</title>
<script type = "text/JavaScript">
var myOpenWindow = window.open('http://www.baidu.com');
var my = confirm("你确定要关闭窗口么?");
if(my == true){
myOpenWindow.close();
}else{
alert("我的小乖乖,以后有什么事儿记得你的度娘哈!");
}
</script>
</head>
<body>
</body>
</html>我的问题是打开窗口,执行完confirm(),点击确定怎么关不了打开的窗口呢?