<!--iframe 自动增高-->
<script type="text/javascript">
function reinitIframe(){
var iframe = document.getElementById("mainframe");
try{
var bHeight = iframe.contentWindow.document.body.scrollHeight;
var dHeight = iframe.contentWindow.document.documentElement.scrollHeight;
var height = Math.max(bHeight, dHeight);
iframe.height = height;
}
catch (ex){}
}window.setInterval("reinitIframe()", 200);
</script>
转载于:https://www.cnblogs.com/tjmsz/archive/2012/01/13/2321604.html