问答详情
源自: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");
     function wocao(){
         
         window.close();
     }
  </script>
</head>
<body>
<input name='button' type='button' onClick='wocao()'value='点击关闭'/>
</body>
</html>

提问者:我叫孟小跳灬 2015-03-18 22:29

个回答

  • 康振宁
    2015-03-19 14:04:44

    能关啊?你用ff或者Chrome试试