iframe 的 onloand事件 根据游览器属性添加下面 bHeight dHeight
var iframe = document.getElementById("lfIframe");
var bHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var dHeight = iframe.contentWindow.document.body.scrollHeight;
iframe.height =bHeight or iframeheight= dHeight
iframe自动适应高度简单js
最新推荐文章于 2024-08-20 23:46:15 发布