bjjl
 <iframe id="myiframe" frameborder=no marginwidth=0 marginheight=0 width="100%" scrolling="no"
                src="./dome.html"></iframe>
 // iframe高度根据该内容适配
 window.onload = function () {
   _this.setIframeHeight(document.getElementById(\'myiframe\'));
};

// iframe高度根据该内容适配

function setIframeHeight(iframe) {
    if (iframe) {
var iframeWin = iframe.contentWindow || iframe.contentDocument.parentWindow;
if (iframeWin.document.body) {
iframe.height = iframeWin.document.documentElement.scrollHeight || iframeWin.document.body.scrollHeight;
}
}
},
 

 

分类:

技术点:

相关文章:

  • 2021-12-12
  • 2021-12-12
  • 2021-09-12
  • 2021-12-22
  • 2021-09-07
  • 2021-09-07
猜你喜欢
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
相关资源
相似解决方案