a页面里iframe了个b页面,我想实现在b页面里一个按钮,一按就刷新a页面,也就是父页面,不是只刷新iframe里面的b页面 哦~
请问b页面里的<input type="button" class="btn" value=" 返 回 " onclick="history.back();">那个onclick 要怎么写呢?啊哈
答案是:parent.location.reload() ;
以下是网上的:
十一种刷新按钮的方法。很不错的,经常上网要找。哈哈。这下放这里了。
<input type=button value=刷新 onclick="history.go(0)">
<input type=button value=刷新 onclick="location.reload()">
<input type=button value=刷新 onclick="location=location">
<input type=button value=刷新 onclick="location.assign(location)">
<input type=button value=刷新 onclick="document.execCommand('Refresh')">
<input type=button value=刷新 onclick="window.navigate(location)">
<input type=button value=刷新 onclick="location.replace(location)">
<input type=button value=刷新 onclick="window.open('自身的文件','_self')">
<input type=button value=刷新 onClick=document.all.WebBrowser.ExecWB(22,1)>
<OBJECT classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 id=WebBrowser width=0></OBJECT>
<form action="自身的文件">
<input type=submit value=刷新>
</form>
<a id=a1 href="自身的文件"></a>
<input type=button value=刷新 onclick="a1.click()">
分享到:
相关推荐
子页面刷新父页面
用iframe、弹出子页面刷新父页面 iframe parent.location.reload(); 弹出子页面 window.opener.location.reload(); 子窗口刷新父窗口 self.window.opener.locaction.reload(); 刷新一open()方法打开的窗口 ...
JS关于刷新父页面例子:javascript 弹出页面点击确定,刷新父页面 仔细分析学习
本Demo汇总是iframe父页面与iframe子页面如何相互调用方法、元素及值的几种常见方法(含JS、JQuery方法)
在同一个父页面中的两个iframe里面的两个子页面,进行无刷新的更新!
父页面 a.jsp 子页面 b.jsp,作为a页面中嵌入的iframe指向的页面 复制代码代码如下: <body> <iframe id=”frame” src=”b.jsp” …/> </body> 现在在b页面中做了一项操作,操作结束后,需要...
fly.js技术,再iframe中刷新父元素列表,再弹出层中刷新父框架
父页面得到iframe的数据和iframe页面得到父页面的数据.txt
NULL 博文链接:https://skying007.iteye.com/blog/1044069
NULL 博文链接:https://747017186.iteye.com/blog/1985110
使用iframe实现图片上传以及上传后的本页面无刷新展示。运行环境是php和jq
使用iframe实现点击导航页面无刷切换,使用bootstrap布局
一、在iframe中查找父页面元素的方法: $(‘#id', window.parent.document) 二、在iframe中调用父页面中定义的方法和变量: parent.method parent.value 三、实例 父页面: <%@ Page Language="C#" ...
对于多数后台管理项目都会使用iframe来加载页面,但是iframe刷新时链接会消失页面会执行首页的页面,本次代码就是解决iframe二级菜单刷新禁止返回首页的操作,简单易懂。
子页面获取父页面的方法,变量,标签等子页面获取父页面的方法,变量,标签等
JS页面跳转和js对iframe进行页面跳转、刷新
项目中的需求: 点击浏览器中的返回按钮,要让页面重新加载资源。因为这部分的资源每次去加载的内容都不一样,如果返回的时候,还是看到原先的内容,那做这个内容块的意义就很小了;而如果用户看完了这部分内容,再...
php+iframe 无刷新上传 外加删除
easyUi弹出window窗口传值与调用父页面的方法,子页面给父页面赋值,详情链接:
本文实例讲述了js中iframe调用父页面的方法。分享给大家供大家参考。具体实现方法如下: 子页面调用父页面的方法在js中很容易实现。我们只需要在主页面加个函数,然后在子页面通过window.parent.方法()即可实现了 ...