iframe中刷新父页面方法及一些按钮刷新代码集合【原创+转】
a页面里iframe了个b页面,我想实现在b页面里一个按钮,一按就刷新a页面,也就是父页面,不是只刷新iframe里面的b页面 哦~ 请问b页面里的<input type="button" class="btn" value=" 返 回 " οnclick="history.back();">那个onclick 要怎么写呢?啊哈 答案是:parent.location.reload() ; 以下是网上的: 十一种刷新按钮的方法。很不错的,经常上网要找。哈哈。这下放这里了。 <input type=button value=刷新 οnclick="history.go(0)"> <input type=button value=刷新 οnclick="location.reload()"> <input type=button value=刷新 οnclick="location=location"> <input type=button value=刷新 οnclick="location.assign(location)"> <input type=button value=刷新 οnclick="document.execCommand('Refresh')"> <input type=button value=刷新 οnclick="window.navigate(location)"> <input type=button value=刷新 οnclick="location.replace(location)"> <input type=button value=刷新 οnclick="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=刷新 οnclick="a1.click()"> iframe中刷新顶层窗口 MAIN.JSP页面使用IFRAME来内嵌了一个内容页面(A.JSP),如何实现用户点击A.JSP页面的连接时,能更新它的父页面(MAIN.JSP)的内容呢? window.parent.location.reload(); window.parent.location.href="地址"; window.top 当前窗口的最顶层窗口 |