网上有很多的都是关闭子窗口,父页面刷新的问题。
我需要处理的场景是。三个界面。

解决办法:
<script>
function refreshParent() {
window.opener.location.href = window.opener.location.href;
window.close();
}
</script>
input type="button" id="btn1" class="btn" value="同意" disabled=true onclick="refreshParent()" />
需要修改:
function closeWindowrefreshParent() {
if (ie6) {
window.opener.location.href = window.opener.location.href;
window.close();
} else {
window.opener.location.href = window.opener.location.href;
window.open('','_top');
window.top.close();
}
}
本文探讨了在多窗口浏览器环境下,如何在关闭子窗口的同时实现父页面的刷新问题。提供了一段JavaScript代码示例,针对不同浏览器的兼容性进行了处理。

1万+

被折叠的 条评论
为什么被折叠?



