87,997
社区成员




<script>
// reload proxy function
function reloadProxy() {
window.location.reload();
}
</script>
<input type="button" value="Open Sub Page" onclick="window.open('B.html', '_blank', 'width=800,height=600')"/>
<!-- indicate if page is reloaded -->
<pre><script>
var rnd = parseInt(Math.random() * 100);
document.write("Page Load Flag: " + rnd);
</script></pre>
<script>
function closeAndReloadParent(evt, el) {
// call proxy function to reload parent indirectly
window.opener.reloadProxy();
// close the window
window.close();
}
</script>
<input type="button" value="close page and reload parent" onclick="closeAndReloadParent(event, this);"/>