代码:
<iframe id="iFrame" name="iFrame" frameborder="0" width="100%" scrolling="no" onload="this.height=iFrame.document.body.scrollHeight" src="index.html"></iframe>
关键就在于onload="this.height=iFrame1.document.body.scrollHeight"!
转载请注明:观测者 » 实现iFrame自适应高度