关闭子窗口时刷新父窗口js

时间:2014-03-20 18:28:40   收藏:0   阅读:376


//刷新父窗口
window.onbeforeunload = function(){
 if (document.body.clientWidth-event.clientX<21||event.altKey||event.ctrlKey){
         //关闭时刷新父窗口

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

}else{

       //否则则是刷新子窗口时也刷新父窗口

       alert("refrash");  

       return false;

      }
}

关闭子窗口时刷新父窗口js,布布扣,bubuko.com

原文:http://blog.csdn.net/chx10051413/article/details/21620513

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!