<script language="javascript">
if (window.parent.length>0){window.parent.document.all.newtest.style.height=document.body.scrollHeight;}
</script>
只需在你被iframe调用的文件</body>之后加入上面这段即可!
博客介绍了在被iframe调用的文件</body>之后添加一段JavaScript代码,代码功能是当window.parent长度大于0时,设置window.parent.document.all.newtest的高度为文档主体的滚动高度。
<script language="javascript">
if (window.parent.length>0){window.parent.document.all.newtest.style.height=document.body.scrollHeight;}
</script>
只需在你被iframe调用的文件</body>之后加入上面这段即可!

被折叠的 条评论
为什么被折叠?