很实用的iframe自动高度设置

<iframe id="iframeId" src="a.html"></iframe>

----------a.html页面--------

<html>

<head>

 <title>test</title>

</head>

<body>

  <form id="forId"><table><tr><td>我的高度</td></tr></table></form>

</body>

</html>

<script>

parent.document.getElementById("iframeId").height=$("#forId").height();

</script>

原文地址:https://www.cnblogs.com/hn_lijia/p/1777603.html