问:
页面a打开一个弹出窗口页面b,我想在页面b关闭的时候只刷新页面a中iframe中包含的页面c这样的功能怎么实现呢?谢谢!
______________________________________________________________________________________________
答1:
1. if you are using open() to 弹出窗口页面b, try in 页面b
<script language="javascript">
function window.onunload()
{
window.opener.IframeID.location.reload(true);
}
</script>
assume you have in 页面a
<iframe src="test.asp" id="IframeID"></iframe>
2. if you use showModalDialog() to 弹出窗口页面b, then pass window as the second parameter in 页面a:
showModalDialog("b.html",window);
and in 页面b, do:
window.dialogArguments.IframeID.location.reload(true);
页面a打开一个弹出窗口页面b,我想在页面b关闭的时候只刷新页面a中iframe中包含的页面c这样的功能怎么实现呢?谢谢!
______________________________________________________________________________________________
答1:
1. if you are using open() to 弹出窗口页面b, try in 页面b
<script language="javascript">
function window.onunload()
{
window.opener.IframeID.location.reload(true);
}
</script>
assume you have in 页面a
<iframe src="test.asp" id="IframeID"></iframe>
2. if you use showModalDialog() to 弹出窗口页面b, then pass window as the second parameter in 页面a:
showModalDialog("b.html",window);
and in 页面b, do:
window.dialogArguments.IframeID.location.reload(true);