最新消息: 新版网站上线了!!!

jquery获取屏幕高度

$(function(){
 
 $("#left_all").css("height", $(window).height());
 
 var left_content = $("#left_content").height()
 alert(left_content)
 
 if ($("#left_content").height()>$(window).height() )   
 
   {
   $("#left_all").css("overflow","auto");   
   }
 else if ($("#left_content").height()<$(window).height() )  
   {
   $("#left_all").css("overflow","hidden"); 
   }
})

转载请注明:谷谷点程序 » jquery获取屏幕高度