父页面:
function reinitIframe() { var iframe = document.getElementById("frame_content"); try { var bHeight = iframe.contentDocument.body.scrollHeight; var dHeight = iframe.contentDocument.documentElement.scrollHeight; var height = Math.max(bHeight, dHeight); iframe.height = height; } catch (ex) { } }
子页面:
$().ready(function () {
window.parent.reinitIframe();
});