iframe 自适应高度经典脚本代码

 <iframe id="frameContent"  frameborder="0"  scrolling="no" src="xxx.aspx" style="100%"></iframe>

<script language="javascript" type="text/javascript">
function sizeChange()
{
    window.status=frameContent.document.body.scrollHeight;
    document.all.frameContent.height=frameContent.document.body.scrollHeight;
}
sizeChange();
</script>

上面应该是目前网上能看到的iframe高度随内容自动调整最简洁的脚本

原文地址:https://www.cnblogs.com/peaceli/p/1318616.html