//iframe自适应高度

var iframeHeight = $("#middle").contents().find("body").height();
$("#middle").css('height', iframeHeight);

原文地址:https://www.cnblogs.com/zfdai/p/3342545.html