在嵌入页面不能全部展示的问题中,可以通过js改变iframe的高度

html部分代码:

<iframe src="#" name="i" ></iframe>

js部分代码:

function reinitIframe() {
var iframe = document.getElementById("urlIframe");
try
{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
iframe.height = bHeight;
} catch (ex) { }
}

 

相关文章:

  • 2021-10-03
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-07-03
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2021-07-19
  • 2021-11-13
  • 2021-10-17
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
相关资源
相似解决方案