-
- 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);
- }
- }