在网上看到很多解决关闭子页面刷新父页面的方法,但是还是没有我想要的,基本上都是在子页面上加个按钮然后实现关闭子页面刷新父页面,那么这样就不能达到点击子页面右上方的叉关闭子页面刷新父页面的效果,不知道怎么能实现点击子页面右上方的叉关闭子页面来达到刷新父页面的效果。求教求教

解决方案 »

  1.   

    <script language=javascript>
    window.top.location.href='父页面‘;window.opener=null;window.close();
    </script>
    先刷新父页面,在关闭子页面
    如果一开始进到父页面时子页面还没打开,那直接刷新父页面就行了
    试试吧
      

  2.   

    子页面中写Response.Write("<script>window.opener.location.href = window.opener.location.href;if(window.opener.progressWindow) window.opener.progressWindow.close();window.close();</script>");
      

  3.   

    var returnValue = window.showModalDialog(url,window,"dialogHeight=350px;dialogWidth=400px;center=yes;status=no;scroll=no;resizable=yes");
    window.unLoad = function(){window.dialogArgument.location.reload();};
      

  4.   

    http://hi.baidu.com/netspirit/blog/item/0b3be0fd2952331a08244d45.html
      

  5.   

    <script language="javascript">
    function Method(){
       window.opener.location=window.opener.location;
    }
    </script> 
     <body onbeforeunload="Method();">
      

  6.   


    function  window.onbeforeunload(){ 
           window.opener.refreshPage(); 
    } 父
    function   refreshPage(){ 
           window.location.reload();