我有一个页面不断刷新自己,我想将页面包含到我的主页面。刷新iframe而不刷新父页面
我正在使用iframe将页面包含到我的主页面,但每当iframe中的页面刷新时,它也会刷新我的主页面。如何在自己的框架内刷新iframe并且不影响我的主页面?
还有没有更好的方式来包含页面而不使用iframe?
我有一个页面不断刷新自己,我想将页面包含到我的主页面。刷新iframe而不刷新父页面
我正在使用iframe将页面包含到我的主页面,但每当iframe中的页面刷新时,它也会刷新我的主页面。如何在自己的框架内刷新iframe并且不影响我的主页面?
还有没有更好的方式来包含页面而不使用iframe?
document.frames["myInnerFrame"].location.href=fl;
http://www.hotscripts.com/forums/javascript/15955-javascript-command-refresh-iframe-content.html
如果您需要刷新页面从背后asp.net代码父页面,你可以注册客户端脚本网页加载运行:
protected void btnOk_Click(object sender, EventArgs e)
{
//Implement Your logic here.....
//..............................
//now refresh parent page and close this window
string script = "this.window.opener.location=this.window.opener.location;this.window.close();";
if (!ClientScript.IsClientScriptBlockRegistered("REFRESH_PARENT"))
ClientScript.RegisterClientScriptBlock(typeof(string), "REFRESH_PARENT", script, true);
}
How to refresh parent page on child window close上的逐步教程演示了上述功能的使用。