复制代码代码如下:
<iframe src="/UploadFiles/2021-03-30/1.htm">
方案一:
用iframe的name属性定位
复制代码代码如下:
<input type="button" name="Button" value="Button" onclick="document.frames('ifrmname').location.reload()">或
<input type="button" name="Button" value="Button" onclick="document.all.ifrmname.document.location.reload()">
方案二:
用iframe的id属性定位
复制代码代码如下:
<input type="button" name="Button" value="Button" onclick="ifrmid.window.location.reload()">
终极方案:
当iframe的src为其它网站地址(跨域操作时)
复制代码代码如下:
<input type="button" name="Button" value="Button" onclick="window.open(document.all.ifrmname.src,'ifrmname','')">
标签:
iframe,刷新
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“iframe如何刷新的三种实现方案”评论...