61,112
社区成员
发帖
与我相关
我的任务
分享
$(".workPanel .tabs .tabs-content").append("<div class='box on' tabhref='"+target+"'><iframe align='top' id='ifram' name='ifram' frameborder='0' scrolling='yes' src='"+target+"' height='100%' width='100%' noresize ></iframe>");
var iframe = document.getElementsByName("ifram")[0];
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
alert(bHeight+","+dHeight);
var height = Math.max(bHeight, dHeight);
iframe.height = height + 20;
}catch (ex){}