this.opener.document.location.reload()

解决方案 »

  1.   

    在第一个页面test.html,代码:
    <script language="JavaScript">
    function op()
    {
    window.open('test2.php','小窗口','height=100, width=400')
    }
     </script>
     <form name="form1" method="post" action="test2.html">
     <input type="text" name="a">
    <input type="text" name="b">
    <input type="button" value="提交" onclick="op()">
    </form>在弹出窗口test2.html,代码如下:
    <script language="JavaScript">
     function clearall()
     {window.close();
     window.opener.document.form1.a.value="";
     window.opener.document.form1.b.value="";
     }
     </script>
    <input type=button onclick=clearall() value="关闭">
      

  2.   

    在小窗口中
    window.opener.location.reload();
      

  3.   

    用location.replace('页面地址'),重新加载页面,这样就没有那个表单提示的窗口了
      

  4.   

    在小窗口中
    window.opener.location.replace('要刷新的页面地址');