日期:2014-05-16 浏览次数:20449 次
<iframe id="frame" border='0' width='100%' height='100%' src='表格1.html' onload="height()"></iframe>
function height2(){
var frame = document.getElementById("frame");
var nheight;
if (frame.Document){
nheight = frame.Document.body.scrollHeight + 20 + "px";
}else{
nheight = frame.contentDocument.body.scrollHeight+ 20 + "px";
}
document.getElementById("div")..style.height = nheight;
}