中国石凳联盟 登录注册

如何刷新另一个窗口的页面

rockage··2 回复·331 浏览

发表回复


比如主页面弹出一个小窗口,在小窗口上执行了某些数据库操作,关闭了这个小窗口后,数据库发生了改变,但主页面并没有刷新,解决方法:



首先,A页面弹出B页面:



a href=javascript:popwin("b.asp")



然后在B页面刷新A页面:



response.write "script language=javascript"
response.write "opener.window.location.reload()" 刷新A页面
response.write "/script"



--------------------------------------------------------------------------------------



Opener对象参考:



当一个窗口用open方法打开了一个新窗口的时候,opener属性就生效了,直到被打开的窗口关闭时失效.
你可以通过opener在被打开的窗口中对父窗口进行一系列操作

点赞0 收藏
不错的功能
Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.
点赞0 收藏

今天用上了,修改以后即时更新


Being a devil is the same as being a human. We should be kind. If we are kind, we are not a devil, we are a hybrid.
点赞0 收藏
发表回复
发表回复