window.open 子窗口关闭刷新父页面

function JsMod(htmlurl,tmpWidth,tmpHeight){
htmlurl=getRandomUrl(htmlurl);
var winObj = window.open(htmlurl, "newwindow", "height="+tmpHeight+",width="+tmpWidth);
var loop = setInterval(function() {
if(winObj.closed) {
clearInterval(loop);
parent.location.reload();
}
}, 1);
}

posted on 2017-05-04 21:31  知了不了了之  阅读(363)  评论(0编辑  收藏  举报