点击打开链接http://www.cnblogs.com/zhangzt/archive/2009/12/24/1631253.html
在主窗口中再打开一个窗口,然后关闭新打开的窗口,则主窗口就刷新
window.opener.location.reload(){
}
window.opener为打开的新窗口b,父窗口a通过window.opener打开窗口b,那么b窗口通过window.parent可以访问父窗口的
可以通过window.opener来引用a窗口中的 document对象。
判断要引用的对象是否为空:
<script type="text/javascript">
alert("${}");
var url = "${url}";
if(window.opener!=null){
window.opener.location.reload();//刷新父窗口
window.close();
}else{
window.location.href(url): //跳转到你所需要的页面
}
</script>
http://yaoayao.iteye.com/blog/762997
---------------------------------------------------------------------------------------
window.location.href(url) / /url为你所想要跳转的页面
本文介绍了如何在JavaScript中使用window.opener与window.location.href进行窗口间的操作,包括父窗口的刷新及新窗口关闭后的跳转等实用技巧。
981

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



