IE6下iframe内容不显示bug
2010-05-13 15:34
274 查看
IE6下的bug实在多,这不这次又碰到一个。
地图搜索结果页面点击一个marker的“更多信息”时,IE7,firefox3.0下都正常。IE6下却无法显示。因为是跨域访问开始以为是http请求慢造成。后更换url后仍然存在。
下面是网上的一些资料
1、认为src不能写在<iframe的后面
http://be-evil.org/showlog-91.html http://social.msdn.microsoft.com/forums/zh-TW/236/thread/a01ee23e-08d6-414d-ba22-9922f456af3c/
2、认为iframe src的URL长度过长
http://yuweijun.blogspot.com/2008/11/when-iframe-src-is-too-long-in-ie6ie7.html http://support.microsoft.com/kb/208427/zh-cn
3、认为iframe不能自适应高度
http://www.cnblogs.com/KenBlove/archive/2009/03/24/1420464.html http://www.jb51.net/article/17724.htm
新建html测试,bug却没有再现,IE6下可以正常使用,很奇怪?
最后猜测是:html书写不规范造成。因为这个结果页面是jsp动态生成的,可能其它代码造成了影响。
最后解决方法:先生成iframe,点击“更多信息”时改变iframe的src,之前是采用每次点击删除之前的iframe,添加新的iframe对象。
地图搜索结果页面点击一个marker的“更多信息”时,IE7,firefox3.0下都正常。IE6下却无法显示。因为是跨域访问开始以为是http请求慢造成。后更换url后仍然存在。
下面是网上的一些资料
1、认为src不能写在<iframe的后面
http://be-evil.org/showlog-91.html http://social.msdn.microsoft.com/forums/zh-TW/236/thread/a01ee23e-08d6-414d-ba22-9922f456af3c/
2、认为iframe src的URL长度过长
http://yuweijun.blogspot.com/2008/11/when-iframe-src-is-too-long-in-ie6ie7.html http://support.microsoft.com/kb/208427/zh-cn
3、认为iframe不能自适应高度
http://www.cnblogs.com/KenBlove/archive/2009/03/24/1420464.html http://www.jb51.net/article/17724.htm
新建html测试,bug却没有再现,IE6下可以正常使用,很奇怪?
<!DOCTYPE HTML> <html> <head> <title>IE6 IFRAME bug?</title> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="this is my page"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <mce:script type="text/javascript"><!-- function iframeIE6() { var c = document.getElementById("container"); var ifr = document.createElement("iframe"); ifr.src = "http://www.sohu.com"; c.appendChild(ifr); } // --></mce:script> </head> <body> <iframe src="http://www.sohu.com" mce_src="http://www.sohu.com" frameborder="0"> </iframe> <input type="button" value="test" onclick="iframeIE6();"/> <div id="container"> </div> </body> </html>
最后猜测是:html书写不规范造成。因为这个结果页面是jsp动态生成的,可能其它代码造成了影响。
最后解决方法:先生成iframe,点击“更多信息”时改变iframe的src,之前是采用每次点击删除之前的iframe,添加新的iframe对象。
相关文章推荐
- IE6 bug:iframe空白,无法显示内容
- ie6动态创建iframe无法显示内容的bug
- IE6 动态创建 iframe 无法显示的 bug--- 芒果
- IE6下iframe调用的页面中含有DD_belatedPNG js的引用,iframe显示为空白的BUG
- IE6 动态创建 iframe 无法显示的 bug,万恶的IE6
- IE6 动态创建 iframe 无法显示的 bug,万恶的IE6
- IE6 动态创建 iframe 无法显示的 bug
- IE6 innerHTML写入的iframe src不显示BUG的解决方法
- 关于Iframe在IE6下不显示的bug
- 转摘 IE6 动态创建 iframe 无法显示的 bug
- IE6 动态创建 iframe 无法显示的 bug,万恶的IE6
- IE6 bug之 无法显示动态创建的iframe
- IE6 bug之 无法显示动态创建的iframe
- 解决IE6下JS动态插入iframe不显示的方法
- 修复Bug,刷新无法动态显示数据库内容
- Android FragmentTabhost内容Fragment不显示等Bug解决方案
- 使用 iframe 实现在同一页面中显示不同的内容
- 跨iframe显示内容
- ie6 表格td中无内容时不显示边框的解决办法
- iframe不能显示内容的问题