iframe切换src后高度自适应

  1. 绑定onload函数
    onload="this.height=this.contentWindow.document.body.scrollHeight;"
  2. 切换iframe的src前,更改它的高度
    $("#contentFrame0").attr('height', 'auto');
原文地址:https://www.cnblogs.com/darkclouds/p/13460484.html