您的位置:首页 > 其它

火狐、谷歌浏览器,页面中两个iframe 只显示一个的问题

2017-08-14 14:46 423 查看
宽为限 紧用功 工夫到 滞塞通

1、错误代码

<iframe id="frame1" frameborder="0" width="100%" height="400" src="1.html" />
<c:if test="${loginNo eq '10210' }">
<iframe id="frame2" frameborder="0" width="880" height="100%" src="2.html" />
</c:if>


2、正确代码

<iframe id="frame1" frameborder="0" width="100%" height="400" src="1.html"></iframe>
<c:if test="${loginNo eq '10210' }">
<iframe id="frame2" frameborder="0" width="880" height="100%" src="2.html"></iframe>
</c:if>


错误代码是单标签结尾的(错误的),在IE兼容模式下可以正常显示,但在谷歌、火狐浏览器下就不行了。

网上找了好久终于到了答案,把单标签结尾改为双标签结尾就OK了。

站在巨人的肩膀上

本文参考文章
https://zhidao.baidu.com/que b000
stion/514373535.html

http://www.runoob.com/tags/tag-iframe.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐