您的位置:首页 > 其它

iframe ie下自动适应高度

2011-08-24 17:10 288 查看
function reinitIframe() {

var iframe = document.getElementById("frmContent");

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);
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: