标签:lin ram document width get oom amp scroll 适应
html:
<iframe name="ifraRight" id="ifraRight" src="jsp/countRoomMeasure.jsp" onload="iFrameHeight(‘ifraRight‘)" height="100%" frameborder="0" width="100%" scrolling="auto"></iframe>
js:
//iframe自适应高度 function iFrameHeight(id) { var ifm= document.getElementById(id); var subWeb = document.frames ? document.frames[id].document : ifm.contentDocument; if(ifm != null && subWeb != null) { ifm.height = subWeb.body.scrollHeight; } }
标签:lin ram document width get oom amp scroll 适应
原文地址:https://www.cnblogs.com/wanyong-wy/p/9826692.html