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);
}
}
浙公网安备 33010602011771号