我在Aspx页面中做了个弹出窗口的页面,弹出窗口执行完操作后,关闭窗口,同时命令父窗口刷新(parent.location.reload();),效果是实现了,但出现了一个头疼的问题,就是页面产生了服务器的回送事件....如何避免这种情况呢?如何刷新页面,但不回送??

解决方案 »

  1.   

    不要用Parent.location.reload();在父窗口中写语句window.location.href=window.location.href;
      

  2.   

    parent.window.location.replace(parent.window.location.href);
      

  3.   

    http://dotnet.aspx.cc/ShowDetail.aspx?id=49ML4AO8-5PB3-4KNY-NJZD-LJOIOXV4M1X4
      

  4.   

    parent.window.location.replace(parent.window.location.href);
    的方法有效避免了回送事件的发生,但好象没有产生页面刷新,需要点一下刷新按钮,新的内容才会出现....有没有更好的方法??
      

  5.   

    <script language=javascript>
      opener.location.href=opener.location.href;
      window.close();
    </script>或者:
    opener.location.assign(opener.location.href);
    window.close();