JQuery obtains the height code of the browser window and document window.
JQuery obtains the height code of the browser window and document window:
This section describes some frequently used codes for obtaining heights. These codes are common in actual operations.
The code list is as follows:
$ (Window ). height (); // The height of the visible area of the current browser window $ (document ). height (); // The height of the current file in the browser window $ (document. body ). height (); // The height of the current file body in the browser window $ (document. body ). outerHeight (true); // the total height of the current window document body in the browser includes border padding margin $ (window ). width (); // The width of the visible area of the current browser window $ (document ). width (); // The width of the document Object in the current window of the browser $ (document. body ). width (); // The height of the current file body in the browser window $ (document. body ). outerWidth (true); // The total width of the current browser window document body includes border padding margin
Related reading:
1. For details about the height () function, see the height () method section of jQuery.
2. For more information about the outerHeight () function, see the outerHeight () method section of jQuery.
3. For more information about the outerWidth () function, see the outerWidth () method section of jQuery.
4. For details about the width () function, see the width () method section of jQuery.
The original address is: http://www.softwhy.com/forum.php? Mod = viewthread & tid = 13048.
For more information, see: http://www.softwhy.com/jquery/