我电脑屏幕分辨率:1440 * 900
 
最大化浏览器,刷新浏览器
alert($(window).width() + "---" + $(window).height());          1423---768
alert($(document).width() + "---" + $(document).height());   2008---2216
alert($("body").width() + "---" + $("body").height());             2000---2200
 
缩小浏览器,刷新页面
alert($(window).width() + "---" + $(window).height());          变小
alert($(document).width() + "---" + $(document).height());  不变
alert($("body").width() + "---" + $("body").height());            不变
 
由此可看出浏览器窗体模型:
$(window):  浏览器显示网页内容的部分
$(document):整个网页文档流
$("body"):就是body,嘿嘿
附图:

JQuery window、document、 body (转)

转载于:https://my.oschina.net/u/212572/blog/795982

相关文章:

  • 2022-02-04
  • 2022-03-09
  • 2021-07-16
  • 2022-12-23
  • 2021-06-21
  • 2021-05-21
  • 2022-12-23
猜你喜欢
  • 2021-08-28
  • 2021-11-02
  • 2021-09-30
  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2022-01-08
相关资源
相似解决方案