为什么加了按钮后网页不会自动关闭了
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>close()</title> <script type="text/javascript"> function rec(){ var mywin=window.open("http://www.imooc.com"); setTimeout("mywin.close()",1000); } </script> </head> <body> <input name="button" type="button" onClick="rec()" value = "点击查看网页" /> </body> </html>