700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > Iframe js 自适应高度

Iframe js 自适应高度

时间:2023-06-09 18:17:05

相关推荐

Iframe js 自适应高度

独角兽企业重金招聘Python工程师标准>>>

<iframe id="mainFrame" name="mainFrame" src="/zwgk/hsearchview" width="740" frameborder="0" scrolling="no" scrolling="no" frameborder="0" ></iframe> <script type="text/javascript" language="javascript">function reinitIframe(){ var iframe = document.getElementById("mainFrame"); try{ var bHeight = iframe.contentWindow.document.body.scrollHeight; var dHeight = iframe.contentWindow.document.documentElement.scrollHeight; var height = Math.max(bHeight, dHeight); iframe.height = height; }catch (ex){} } window.setInterval("reinitIframe()", 100); </script>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。