js刷新父页面

页面1topFrameleftFramemainFrame在"topFrame"里点击链接或按钮,刷新"页面1"该怎么做?... 页面1
topFrame
leftFrame
mainFrame

在"topFrame"里点击链接或按钮,刷新"页面1"
该怎么做?
展开
 我来答
tangranchuxx
2011-04-04 · TA获得超过281个赞
知道小有建树答主
回答量:319
采纳率:0%
帮助的人:231万
展开全部
简单回答:自己看,不再赘述
用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>");
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
刺友互
高粉答主

2019-06-20 · 每个回答都超有意思的
知道答主
回答量:3979
采纳率:100%
帮助的人:64.5万
展开全部

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>")。

本回答被网友采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式