雪莱特子公司无人机:怎样实现在关闭子页面的同时让父页面自动刷新一次!

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 01:08:44
怎样实现在关闭子页面的同时让父页面自动刷新一次!

子页面是从父页面弹出来的新窗口!
请问你说的子窗口取父窗口是什么意思?
是父窗口的名称吗?举例说明吧!

<script>
function op(){
newopen=window.open("post.php","0","0");
setInterval('wen()',10);
}
function wen(){
if(newopen.closed){
window.location.reload();
}
}
</script>

<span style="CURSOR: hand" onclick='op()'><IMG SRC="img/post.gif" WIDTH="40" HEIGHT="20" BORDER=0 ALT="填写新的留言"></span>

关闭子窗口自动刷新父窗口

子窗口取父窗口: opener.xxxxxxxxxxxxxxx
父窗口取子窗口:window名.xxxxxxxxxxx 其中window名=window.open('index.htm')