JS Get visual Area Height

Source: Internet
Author: User

1 document.body.clientWidth ==> Body Object width2 document.body.clientHeight ==> Body Object Height3 document.documentElement.clientWidth ==> Visible area width4 document.documentElement.clientHeight ==> Visible area height5   6 Web page Visible area width: document.body.clientWidth7 Web page Visible area height: document.body.clientHeight8 Web page Visible area width: document.body.offsetWidth (including Edge Width)9 Web page Visible area high: document.body.offsetHeight (including Edge Height)Ten page Body Full text width: document.body.scrollWidth one page Body Full text high: document.body.scrollHeight a page is rolled away high: Document.body.scrollTop - webpage is rolled away left: document.body.scrollLeft - page Body part: window.screentop the page body part left: Window.screenleft - High screen resolution: window.screen.height - width of screen resolution: window.screen.width - screen available work area height: Window.screen.availHeight + screen available work area Width: Window.screen.availWidth -    + //part of jquery function a $ (window). Height ()//browser window visibility Area at $ (document). Height ()//browser window - $ (document.body). Height ()//browser Current window document body altitude - $ (document.body). outerheight (true)//browser window document The total height of the body includes border padding margin - $ (window). Width ()//browser Current window viewable area widths - $ (document). Width ()//browser window document for image width - $ (document.body). Width ()//browser The height of the document body in the current window in $ (document.body). outerwidth (true)//browser window document The total width of the body includes border padding -    to html precise positioning: scrollleft,scrollwidth,clientwidth,offsetwidth + scrollheight: Gets the scroll height of the Object.  - scrollleft: Sets or gets the distance between the left edge of the object and the leftmost of the currently visible content in the window the scrolltop: Sets or gets the distance between the top of the object and the top of the visible content in the window * Scrollwidth: Gets the scrolling width of the object $ Offsetheight: Gets the height of the object relative to the layout or parent coordinates specified by the parent coordinate OffsetParent propertyPanax Notoginseng Offsetleft: Gets the calculated left position of the object relative to the layout or the parent coordinate specified by the OffsetParent property - OffsetTop: gets the computed top position of the object relative to the layout or the parent coordinate specified by the OffsetTop property the event.clientx Horizontal coordinates of relative documents + event.clienty Vertical coordinates of relative documents a event.offsetx Horizontal coordinates relative to the container the event.offsety The vertical coordinate of the relative container + Document.documentElement.scrollTop The vertical scrolling value - event.clientx+document.documentelement.scrolltop Horizontal coordinates of relative documents + amount of vertical scrolling

JS Get visual Area Height

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.