如何让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>

