$(document).ready(function()   {  
    alert($(window).height()); //浏览器时下窗口可视区域高度  
    alert($(document).height()); //浏览器时下窗口文档的高度  
    alert($(document.body).height());//浏览器时下窗口文档body的高度  
    alert($(document.body).outerHeight(true));//浏览器时下窗口文档body的总高度包括border padding margin  
    alert($(window).width()); //浏览器时下窗口可视区域宽度  
    alert($(document).width());//浏览器时下窗口文档对于象宽度  
    alert($(document.body).width());//浏览器时下窗口文档body的高度  
    alert($(document.body).outerWidth(true));//浏览器时下窗口文档body的总宽度包括border padding margin  
    } ) 

 JQuery的$(window).height()指示的是浏览器窗口的高度;

$(document).height();如果文档的内容的高度还不足浏览器的高度的时候,则浏览器窗口的高度
     但是当文档点内容高度超过浏览器的高度点时候,则其高度是整个文档的高度。
$(document.body).height() 则指的是文档的实际高度。

相关文章:

  • 2022-01-09
  • 2021-05-17
  • 2021-11-18
  • 2022-01-30
  • 2021-11-30
  • 2021-07-29
  • 2022-01-23
  • 2022-12-23
猜你喜欢
  • 2021-12-26
  • 2022-01-08
  • 2021-10-13
  • 2021-12-25
相关资源
相似解决方案