假设一个网页的高度是浏览器窗口的两倍(因此有一个滚动条)。如何在jQuery中检索网页的高度?
发布于 2009-08-20 06:51:26
$(window).height(); // returns height of browser viewport
$(document).height(); // returns height of HTML document
发布于 2009-08-20 06:52:10
您可以使用文档的height()
。
$(document).height();
发布于 2018-08-18 09:25:38
这也是可行的。
$('body').height();
https://stackoverflow.com/questions/1304378
复制相似问题