问题描述
我有打开窗口B的窗口A,打开窗口C的窗口.关闭窗口C时,我希望它刷新窗口B.在窗口C中,我有以下内容:
I have Window A that opens Window B that opens Window C. When Window C closes, I want it to refresh Window B. In Window C I have this:
<body onunload="opener.location.href = opener.location.href;">
这将刷新我的本地主机上的窗口B.如果我在开发Web服务器上使用相同的东西,那将不起作用.我收到权限被拒绝"错误.我猜想它不起作用,因为Window B和Window A和Window B在不同的域上.在我的本地主机上,所有窗口都是本地的.
This refreshes Window B on my localhost. If I use the same thing on our developement webserver, it doesn''t work. I get Permission Denied Error. I am guessing that it doesn''t work because Window B is on a different domain then Window A and Window B. On my localhost all of the windows were local. Is tehre a way to get this to work?
推荐答案
function reload()
{
//force refresh
}
然后调用该函数
Then call that function
<body onunload="opener.reload();">
这篇关于我有打开窗口B的窗口A,打开窗口C的窗口.关闭窗口C时,我希望它刷新窗口B.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!