网页中实现刷新的iframe刷新方式有几种
这篇文章给大家分享的是网页中实现刷新的iframe刷新方式有几种。小编觉得挺实用的,因此分享给大家做个参考,文中的介绍得很详细,而要易于理解和学习,有需要的朋友可以参考,接下来就跟随小编一起了解看看吧。 在网页中我们经常会使用和看到刷新,那么你知道HTML中的iframe刷新方式有哪些吗 <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刷新方式有几种”的介绍了,感谢各位的阅读。 (编辑:银川站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |