guangxiaoluo

满足获取各种高的需求

$(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 
} 

 

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2022-02-21
  • 2021-08-15
  • 2022-12-23
  • 2021-10-03
  • 2021-07-02
猜你喜欢
  • 2022-12-23
  • 2022-01-11
  • 2021-10-19
  • 2021-05-17
  • 2021-11-29
  • 2021-08-21
相关资源
相似解决方案