IFRAM随内部长宽高变化

<iframe src="" id="iframe_CustomerVisitRecord" width="700" height="300" frameborder="0" scrolling="auto"></iframe>

$(window.parent.document).find("#iframe_CustomerVisitRecord").load(function(){
var main = $(window.parent.document).find("#iframe_CustomerVisitRecord");
var thisheight = $(document).height()+30;
main.height(thisheight);
});


$(window.parent.document).find("#iframe_CustomerVisitRecord").load(function () {
var main = $(window.parent.document).find("#iframe_CustomerVisitRecord");
var thisheight = $(document).height() + 30;
main.height(thisheight);
});

原文地址:https://www.cnblogs.com/chengleijiang/p/5213797.html