self.opener.location.reload();
window.close();

解决方案 »

  1.   

    补充上面的兄弟的意思
    有两种情况,一种是你用程序关闭该窗口,那么你可以用上面的兄弟的方法;
    一种是别人在浏览时用鼠标关闭窗口,这个时候你应该这么写;
    <body onunload="refreshparentwin()">

    <script language="javascript">
    function refreshparentwin() {
      self.opener.location.reload();
    }
    </script>
      

  2.   

    例子:
    <input onclick="window.open('test.htm')" value="Test" type=button>test.htm
    =============
    <body onbeforeunload="opener.window.location.reload();">
      

  3.   

    window.opener.location.reload();
    window.close();