网页编程:用javascript里的window.open打开一个窗口后,想在关闭页后再刷新父页面,怎么办呢?

来源:百度知道 编辑:UC知道 时间:2024/05/23 10:33:29
比如:
window.open

("LookOver.aspx","def","top=20,left=150,width=680px,height=680px,scrollbars=auto");
alert("this is test");
打开窗口的同时也显示提示信息了。
还有我怎么在新打开的页面去调父页面里的函数呀?
请大虾指教,不胜感谢!

在新开的窗口的代码中加入下面JS代码
window.onclose=function(){
parent.refresh;
}

parent就是引用父页面窗口

关闭自己window.close();
刷新父页面opener.location.reload();
应该先刷新,再关闭.