function IFrameResize(){
//alert(this.document.body.scrollHeight); //弹出当前页面的高度
var obj = parent.document.getElementById("frame_content"); //取得父页面IFrame对象
// alert(obj.height); //弹出父页面中IFrame中设置的高度
obj.style.height = this.document.body.scrollHeight; //调整父页面中IFrame的高度为此页面的高度
//alert(obj.height);
}
function window.onload()
{
IFrameResize(); //改变 Iframe 高度
}
自动调整IFrame的高度
最新推荐文章于 2024-06-14 15:13:12 发布