问题描述
大家好,
当我关闭子窗口浏览器时,我想刷新我的父页面.子窗口和父窗口都使用母版页.但是在哪里可以使用javascript处理OnUnload方法来刷新父页面.我在主体标签中使用了以下代码
onunload ="window.opener.location.reload(false)"
它工作正常.但是在执行其他表单时遇到问题,因为这些表单也会使用母版页.因此,我想在我的特定子窗体中使用此onunload.如何处理.请建议或发送代码
感谢
Hi every one,
I want to refresh my parent page when i close child window browser. both child and parent window uses master page. But where to handle OnUnload method using javascript for refreshing the parent page. i used the below code in master body tag
onunload="window.opener.location.reload(false)"
it is working fine. but getting problem while executing other forms as these forms also use the master page. So i want to use this onunload in my specific child form. How can this be handled. Plz suggest or send the code
thanks
推荐答案
window.close();<br />
if (window.opener && !window.opener.closed)<br />
{<br />
window.opener.location.reload();<br />
}
问候
koolprasad2003:)
regards
koolprasad2003 :)
这篇关于在浏览器上关闭的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!