@前端
网上找了很久,发现最简单的方法
转载:https://blog.csdn.net/xieamy/article/details/65443074
<iframe id="mainIframe"
onload="this.height=this.contentWindow.document.documentElement.scrollHeight"
width="100%"
frameborder="no"
border="0" scrolling="no" src="xxxx">
</iframe>
οnlοad=“this.height=this.contentWindow.document.documentElement.scrollHeight”
οnlοad=“this.height=this.contentWindow.document.documentElement.scrollHeight”
οnlοad=“this.height=this.contentWindow.document.documentElement.scrollHeight”