w=window.open('a.html');
w.close();

解决方案 »

  1.   

    用了一,好象不灵了。我是在.net的code-behind中,用response.write("<script>x.close()</script>")的方式,好象不行了。关闭不了。
      

  2.   

    -----
    w=window.open('a.html');
    w.close();-------------------
    你要先在打开窗口时把窗口句柄获得,在要关闭时使用这个句柄,不能在要关闭时又调用window.open,这样当然会又打开一个窗口,然后这个窗口把自己给关了如在a 页面:
    var  w=window.open('a.html')
    ;.............
    ......
    在要关闭打开的窗口的时候写
    w.close();
      

  3.   

    http://blog.csdn.net/bluedestiny/archive/2006/04/11/659608.aspx
      

  4.   

    <script language=javascript>
      window.close('winclose.aspx');
    </script>
    这样可以