`
twinkleliang
  • 浏览: 31106 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

iframe刷新父页面的方法及按钮刷新集合

 
阅读更多
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()">



想改成自动的 做个计时器就可以了。不用我写了吧呵呵
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics