1.用iframe、弹出子页面刷新父页面iframe
<script language=JavaScript> parent.location.reload(); </script>
2.弹出子页面
<script language=JavaScript> window.opener.location.reload(); </script>
3.子窗口刷新父窗口
<script language=JavaScript> self.opener.location.reload(); </script>
4.刷新以open()方法打开的窗口
<script language=JavaScript> window.opener.location.href=window.opener.location.href; </script>
5.刷新以winodw.showModelDialog()方法打开的窗口
<script language="javascript"> window.parent.dialogArguments.document.execCommand('Refresh'); </script>
6.点击 layer 中刷新当前页
var iframes= parent.document.getElementsByTagName('iframe'); for(var i=0;i<iframes.length;i++){ var src=iframes[i].contentWindow.location.href; console.log( src); if(src.indexOf("table.jsp")!=-1){ console.log( "刷新:"+src); parent.document.getElementsByTagName('iframe')[i].contentWindow.location.reload(true); } }
parent.document.getElementById('my_iframe').contentWindow.location.reload(true);
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
暂无“javascript刷新父页面方法汇总详解”评论...
更新动态
2024年05月15日
2024年05月15日
- dnf110自定义史诗有几件
- 张国荣1979-情人箭[Polydor][APE+CUE]
- KOKIA-歌か?チカラ(2004K2HD2015mora)[96-24]FLAC
- 松田聖子SeikoMatsuda《SEIKOJAZZ1》2017[WAV]
- 玩家发现《剑星》独特动画:出现概率极低!
- 消息称百度董事长李彦宏亲自开除璩静:对其非常生气
- 《纸片马里奥RPG重置版》新预告公开 5月23日发售
- 翁立友.2010-男性的坚持经典集【豪记】【WAV+CUE】
- 常宽.1994-宽【华星】【WAV+CUE】
- 草蜢.1998-快慢精选30首2CD【宝丽金】【WAV+CUE】
- 韩红/陈萨《沉默的光影》[FLAC/分轨][105.37MB]
- 群星《华纳至尊金曲》2CD[FLAC][865M]
- 周杰伦《JAY》[WAV分轨][624M]
- dnf110装备搭配
- 崩坏星穹铁道2.2美梦往事活动攻略大全 钟表小子美梦往事全流程选择