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);
}

原文地址:https://www.cnblogs.com/itniwota/p/6809985.html