您的位置:首页 > Web前端 > JavaScript

js获取页面内iframe的高度

2013-03-03 13:51 246 查看
function SetCwinHeight(f){
var iframe=$G(f);
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){}
$G(f).contentWindow.nameIncreasing();
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  js iframe