window.onload = function () { setIframe(); }; function setIframe() { var ifm= document.getElementById("external-frame"); ifm.height=document.documentElement.clientHeight; ifm.width=document.documentElement.clientWidth; }; <iframe src="jasper.html" frameborder="0" scrolling="no" id="external-frame" οnlοad="setIframe(this)"></iframe>
iframe 自适应宽度和高度
最新推荐文章于 2023-04-12 10:09:10 发布