JQuery obtains the height code of the browser window and document window.

Source: Internet
Author: User

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/

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.