为啥在写关闭时间的时候不管用?
为啥在写关闭时间的时候不管用?
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
<script type="text/javascript">
function openUrl(){
var mywin=window.open("http://www.imooc.com");
setTimeout("mywin.close()",3000);
mywin.close();
}
</script>
</head>
<body>
<input name="button" type="button" onClick="openUrl()" value="点击我!" />
</body>
</html>