iframe自适应高度

来源:互联网 发布:tc编程 编辑:程序博客网 时间:2024/06/05 00:24

function  heightSet(thisFrame){

      if($.browser.mozilla || $.browser.msie){

          bodyHeight =window.frames["thisFrameName"].document.body.scrollHeight;

      }else{

          bodyHeight =thisFrame.contentWindow.document.documentElement.scrollHeight;

      }

       document.getElementById("thisFrameId").height=bodyHeight;  

}

原创粉丝点击