首页 热点专区 义务教育 高等教育 出国留学 考研考公

js刷新父页面

发布网友

我来回答

2个回答

热心网友

简单回答:自己看,不再赘述
用iframe、弹出子页面刷新父页面

iframe
parent.location.reload();

弹出子页面
window.opener.location.reload();

子窗口刷新父窗口

self.window.opener.locaction.reload();

刷新一open()方法打开的窗口

window.opener.location.href = window.opener.location.href

刷新以winodw.showModelDialog()方法打开的窗口

window.parent.dialogArguments.document.execCommand('Refresh');



Response.Write("<script>window.location.href = window.location.href</script>");

刷新本页Response.Write("<script>window.location.href=window.location.href; </script>");

刷新父页和本页面:

Response.Write("<script>alert('提交成功!');window.location.href=window.location.href;window.opener.location=window.opener.location;</script>");

热心网友

1、复制代码代码。

2、返回并刷新页面:location.replace(document.referrer);document.referrer //前一个页面的URL不要用 history.go(-1),或 history.back();来返回并刷新页面。

3、页面自动刷新:把如下代码加入<head>区域中 <meta http-equiv="refresh" content="20"> 其中20指每隔20秒刷新一次页面。

4、页面自动跳转:把如下代码加入<head>区域中 <meta http-equiv="refresh" content="20;url=http://www.jb51.net"> 其中20指隔20秒后跳转到http://www.jb51.net页面 。

5、刷新本页:Response.Write("<script language=javascript>window.location.href=window.location.href;</script>")。

6、转到指定页:Response.Write("<script language=javascript>window.location.href='yourpage.aspx';</script>")。

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com