iframe框架如何实现内容自适应高度调整?
- 内容介绍
- 文章标签
- 相关推荐
本文共计56个文字,预计阅读时间需要1分钟。
<script language="javascript"> function autoResizeIframe() { var fheight; fheight = window.zxpage.document.body.scrollHeight; if (fheight<=500) fheight = 550; document.getElementById("zxpage").height = fheight+50; } </script> <iframe name="zxpage" src="/zx/xx.asp" id="zxpage" onload="javascript:autoResizeIframe()" width="100%" style="border: none;"></iframe>
本文共计56个文字,预计阅读时间需要1分钟。
<script language="javascript"> function autoResizeIframe() { var fheight; fheight = window.zxpage.document.body.scrollHeight; if (fheight<=500) fheight = 550; document.getElementById("zxpage").height = fheight+50; } </script> <iframe name="zxpage" src="/zx/xx.asp" id="zxpage" onload="javascript:autoResizeIframe()" width="100%" style="border: none;"></iframe>

