iframe中刷新父页面方法及一些按钮刷新代码集合【原创+转】2009-07-23 11:12a页面里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嵌入的子页面如何刷新父窗口
- js 在iframe子页面获取父页面元素,或在父页面 获取iframe子页面的元素的几种方式
- 更新记录后关闭子窗口并刷新父窗口的Javascript
- jsp子页面(iframe)获取父页面(在另一个页面中用iframe)元素的方法
- iframe子页面获取父页面元素的方法
- jsp子页面(iframe)获取父页面(在另一个页面中用iframe)元素的方法
- 当页面中的iframe高度隐藏,如何计算父页面的滚动条被卷去的高度
- 子页面iframe跨域执行父页面定义的JS方法
- JS技巧:调用iframe中父页面/子页面中的JavaScript方法
- js中iframe的子父页面互相操作的方法