问答详情
源自:2-6 JavaScript-关闭窗口(window.close)

加一个延迟,窗口就不会关这么快了啦

<!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(function(){mywin.open();}, 5000);  
    setTimeout(function(){mywin.close();}, 5000);

   </script>
</head>
<body>
</body>
</html>


提问者:qq_肖恩_0 2015-06-24 21:34

个回答

  • 风中夜跑
    2015-12-14 16:07:33

    dyfdiytdu