iframe只适应大小。ps:在ie和ff通过测试
来源:互联网 发布:淘宝试衣间软件 编辑:程序博客网 时间:2024/06/07 05:42
<script type="text/javascript">
function reinitIframe(){
//高度适应
var iframe = document.getElementById("personiframe");
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){}
//宽度适应
try{
var fwidth = iframe.contentWindow.document.body.scrollWidth;
var dwidth = iframe.contentWindow.document.documentElement.scrollWidth;
var ffwidth = Math.max(fwidth, dwidth);
iframe.width = ffwidth;
}catch (ex){}
}
window.setInterval("reinitIframe()", 200);
</script>
- iframe只适应大小。ps:在ie和ff通过测试
- //iframe自适应高度[在IE6 IE7 FF下测试通过]
- Iframe在火狐和IE自动适应高度
- javascript跨Iframe遮罩层.(IE6 IE7 IE8 FF测试通过)
- 关于body的"大小"在ie和ff下的一些基础知识
- jquery iframe高度只适应
- 让iframe可编辑,兼容IE和FF
- 兼容ff和ie的可编辑iframe
- iframe IE FF高度自适应
- 使iframe高度和宽度适应浏览器可视区域大小
- iframe 自动适应页面大小
- iframe 自动适应页面大小
- Js在IE和FF兼容性问题汇总
- JavaScript 在IE和FF的兼容性问题
- css在IE和FF中的区别
- iframe嵌套的网页大小适应iframe
- 通过一个小技巧可以让flash和iframe的在ie下遮挡问题解决
- iframe高度自适应,兼容IE,FF
- PVote可未授权改变管理
- Android 核心分析 之六 -----IPC框架分析 Binder,Service,Service manager
- Android之 BatteryService
- hdoj 1482 poj 1013
- [转]深入浅出JSON
- iframe只适应大小。ps:在ie和ff通过测试
- Android之 UI主线程
- Opening URL in a browser from JavaFX Desktop Application
- win2000/win2003终端服务器超出最大允许连接数解决之道全攻略
- 更改IE8文件上传路径为C:/fakepath/
- 男人、爱情和狗
- 使IIS支持FLV文件类型
- DELL e6400在xp下将硬盘模式从IRRT修改为AHCI
- 软件字体过小解决方法