复制代码代码如下:
<iframe src=”1.htm” name=”ifrmname” id=”ifrmid”></iframe>
方案一:
用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如何刷新的三种实现方案分享 的全部内容且更多的html语言教程关注<计算机技术网(www.ctvol.com)!!>
本文来自网络收集,不代表计算机技术网立场,如涉及侵权请联系管理员删除。
ctvol管理联系方式QQ:251552304
本文章地址:https://www.ctvol.com/htmltutorial/490169.html