从弹出窗口刷新父页面 [英] refresh a parent page from popup
本文介绍了从弹出窗口刷新父页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在ASP.NET中完成弹出窗口加载后刷新父页面??
解决方案
< ; pre lang = cs> string Script = window.parent.location = window.parent.parent.location;;
ClientScript.RegisterClientScriptBlock( typeof (页面), 关闭,脚本, true );
使用上面的内容如果你在弹出窗口中调用aspx页面
或者只需使用
< script language = javascript >
function closeandrefresh()
{
window .parent。< span class =code-sdkkeyword> location = window .parent.parent。 location ;
}
< / script>
调用close事件时调用上面的函数。
我用这个
Response.Write( < script language = javascript>)
Response.Write( opener.location.href = opener.location.href;)
Response.Write( window.close();)
Response.Write( < /脚本>中跨度>)
How can i refresh a parent page when a popupwindow load has completed in ASP.NET...?
解决方案
<pre lang="cs">string Script = "window.parent.location=window.parent.parent.location;"; ClientScript.RegisterClientScriptBlock(typeof(Page), "Close", Script, true);
use the above if you are calling aspx page in the popup
or simply use
<script language="javascript"> function closeandrefresh() { window.parent.location=window.parent.parent.location; } </script>
call the above function when the close event is called.
i use this
Response.Write("<script language=javascript>") Response.Write("opener.location.href=opener.location.href;") Response.Write("window.close();") Response.Write("</script>")
这篇关于从弹出窗口刷新父页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文