前端

$(document).height()与$(window).h

2017-10-25  本文已影响3人  忘川慕白

jQuery(window).height()代表了当前可见区域的大小,而jQuery(document).height()则代表了整个文档的高度,可视具体情况使用.

注意当浏览器窗口大小改变时(如最大化或拉大窗口后) jQuery(window).height() 随之改变,但是jQuery(document).height()是不变的。

上一篇 下一篇

猜你喜欢

热点阅读