Home  >  Article  >  Web Front-end  >  Use the height() method in jquery to obtain a complete list of various heights_jquery

Use the height() method in jquery to obtain a complete list of various heights_jquery

WBOY
WBOYOriginal
2016-05-16 16:53:51941browse

Copy code The code is as follows:

alert($(window).height()); //The height of the visible area of ​​the current browser window

alert($(document).height()); //Height of the browser’s current window document

alert($(document.body).height());//The height of the document body in the current window of the browser

alert($(document.body).outerHeight(true));//The total height of the document body in the current window of the browser, including border padding margin

alert($(window).width()); //Width of the visible area of ​​the browser’s current window

alert($(document).width());//Browser current window document object width

alert($(document.body).width());//The height of the document body in the current window of the browser

alert($(document.body).outerWidth(true));//The total width of the document body in the current window of the browser, including border padding margin

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn