如何使模态窗口关闭后刷新父页面

后期补充:

window.open模式

window.onbeforeunload=function()

{

window.opener.location.reload();

}

这段代码问题:只有手动关闭子页面,才能刷新父页面。。。用<script>alert('xx');window.close();</script>这种方式是不行的。。。

方案:

<script type="text/javascript">
  function closeMeAndReloadParent()
     {  
       alert('操作成功');
         opener.location.reload();
         window.close();
     }
</script>

posted @ 2014-04-07 11:45  thekingofreturn  阅读(602)  评论(0编辑  收藏  举报