jQuery网页高度 [英] jQuery web page height
本文介绍了jQuery网页高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设网页的高度是浏览器窗口的两倍(因此有一个滚动条)。如何在jQuery中检索网页的高度?
Let's say that a web page is twice the height of the browser window (thus there's a scroll bar). How do I retrieve the height of the web page in jQuery?
推荐答案
$(window).height(); // returns height of browser viewport
$(document).height(); // returns height of HTML document
这篇关于jQuery网页高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文