ITeye博客

Iframe高度自动变化

Jxdwuao · 2010-12-13 14:43 · JS · Web前端 · Markdown

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

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。