关于IFrame的高度问题的解决(避开滚动条)
2013-04-08 15:44
267 查看
http://www.kuqin.com/webpagedesign/20080516/8536.html 原创链接,由于里面有例子,转载的时候麻烦,所以此处注明
<iframe id="frame_content" src="iframe_b.html" scrolling="no" frameborder="0" onload="this.height=100"></iframe> <script type="text/javascript"> function reinitIframe(){ var iframe = document.getElementById("frame_content"); try{ var bHeight = iframe.contentWindow.document.body.scrollHeight; var dHeight = iframe.contentWindow.document.documentElement.scrollHeight; var height = Math.max(bHeight, dHeight); iframe.height = height; }catch (ex){} } window.setInterval("reinitIframe()", 200); </script>
相关文章推荐
- html关于强制显示、隐藏浏览器的滚动条,解决由于高度变化带来的滚动条影响页面宽度的问题
- 关于iframe自适应高度,解决一个iframe动态改变url,改变页面同时解决高度自适应问题
- adminLte 解决iframe高度问题
- 关于华为手机自定义view中NavigationBar显示与隐藏造成高度问题的解决办法
- 完美解决 IOS系统safari5.0 浏览器页面布局iframe滚动条失效问题,iossafari5.0
- 解决iframe自适应高度问题
- 使用jQuery不判断浏览器高度解决iframe自适应高度问题
- 关于iframe页面高度自适应的问题
- 解决上左右页面框架中iframe的引起的滚动条问题
- jquery ajax应用中iframe自适应高度问题解决方法
- 通过iframe引入另外一个项目中的html片段到项目中,解决样式,高度,兼容等问题的策略
- Iframe自适应页面高度问题的最简单最适用的解决办法
- 使用jQuery不判断浏览器高度解决iframe自适应高度问题
- 通过iframe引入另外一个项目中的html片段到项目中,解决样式,高度,兼容等问题的策略
- iframe在ie和firefox中的高度兼容性问题解决
- 两段超简单jquery代码解决iframe自适应高度问题(不用判断浏览器高度)
- 【原】 iFrame 自适应高度解决不了的问题所在和解决办法
- 关于div中放入一个img元素导致div高度会多出几个像素的解决问题
- 关于高度塌陷问题解决方法
- 原创,真正解决iframe高度自适应的问题.兼容各浏览器