iframe自适应高度

function iFrameHeight() { 
	var ifm= document.getElementById("common"); //获得iframe,common为iframe的ID 
	//document.frames['common'].document是IE6 IE7中的方法 
	var subWeb = document.frames ? document.frames["common"].document : ifm.contentDocument; 
	if(ifm != null && subWeb != null) { 
		$(ifm).height(subWeb.body.scrollHeight);
	} 
} 

原文地址:https://www.cnblogs.com/itmyhome/p/4131333.html