iframe自适应高度
2008-11-12 16:35
183 查看
//iframe自适应高度
function SetCwinHeight(iframeID){
var bobo=document.getElementById(iframeID);
if (document.getElementById){
if (bobo && !window.opera){
if (bobo.contentDocument && bobo.contentDocument.body.offsetHeight){
bobo.height = bobo.contentDocument.body.offsetHeight+20+'px';
}else if(bobo.Document && bobo.Document.body.scrollHeight){
bobo.height = bobo.Document.body.scrollHeight+20+'px';
}
}
}
}
function SetCwinHeight(iframeID){
var bobo=document.getElementById(iframeID);
if (document.getElementById){
if (bobo && !window.opera){
if (bobo.contentDocument && bobo.contentDocument.body.offsetHeight){
bobo.height = bobo.contentDocument.body.offsetHeight+20+'px';
}else if(bobo.Document && bobo.Document.body.scrollHeight){
bobo.height = bobo.Document.body.scrollHeight+20+'px';
}
}
}
}
相关文章推荐
- iframe高度自适应内容
- iframe自适应父窗口高度改变兼容IE firefox
- 关于iframe内页高度自适应
- jquery 实现iframe 自适应高度
- [转载]再谈iframe自适应高度
- 解决IFrame高度自适应
- 兼容多浏览器的iframe自适应高度(ie8 、谷歌浏览器4.0和 firefox3.5.3)
- 【转载】iframe自适应高度详解(转帖)
- iframe自适应高度的多种方法方法小结
- iframe自适应高度
- iframe自适应高度,多层嵌套iframe自适应高度的解决方法
- 网页布局中iframe高度自适应问题总结
- iframe自适应高度 iframe
- iframe自适应高度
- 实现iFrame自适应高度,原来很简单!
- Iframe自适应高度
- 【转】真正的iframe高度自适应(兼容IE,FF,Opera)
- 真正解决iframe自适应高度
- iframe自适应高度
- 嵌套自适应调整所有iframe的高度