window.open("...");
window.close();

解决方案 »

  1.   

    window.open("...");
    opener=null;
    window.close();
      

  2.   

    window.open("a.htm","","");
    window.opener = null;
    window.close();
      

  3.   

    有a.htm,b.htm
    b.htm为弹出页面,我在b.htm写<body onload="javascript:window.opener.close();">
    但是这样写,回弹出对话框,问是否关闭。我想实现自动关闭,不弹出对话框,应该怎么做?
      

  4.   

    就是前面人说的,在opener.close()前加入window.opener = null;对了,现在应该变成
    window.opener.opener=null;
      

  5.   

    寫在A.HTM中﹕
    window.open("b.htm")
    opener=null;
    window.close();
      

  6.   

    <html>
    <head>
    <script language="javascript">
    function msg()
    {
    msg=window.open("http://www.google.com")
    setTimeout("top.close()",1000)
    }
    </script>
    </head>
    <body onload="msg()">
    </body>
    </html>