我想要1s钟之后再关闭,这样写好像哪里错了?帮我看看吧!
var mywin=window.open("http://www.imooc.com"); setTimeout(mywin.close(),1000);
我想要1s钟之后再关闭,这样写好像哪里错了?帮我看看吧!
var mywin=window.open("http://www.imooc.com"); setTimeout(mywin.close(),1000);
我想要1s钟之后再关闭,这样写好像哪里错了?帮我看看吧!
2017-01-06
<!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");
setTimeout("mywin.close()",5000);
mywin.close();
</script>
</head>
<body>
</body>
</html>
为什么还是很快速就关掉网页了呢,,,求解
举报