jquery window, document various heights of understanding

Source: Internet
Author: User
<span id="Label3"></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ (document). Height (): the width of the entire Web page</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ (window). Height (): width of the browser's visible window</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ (window). scrolltop (): The height of the top of the browser visible window (vertical Offset) from the top of the page</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">In a word, it is: $ (document) when the page scroll bar is pulled to the lowest end. height () = = $ (window). Height () + $ (window). scrolltop ().</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ (document) When the page height is less than the browser window. height () returns a $ (window). height ().</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">It is not recommended to use $ ("html"). height (), $ ("body").</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">Reason:</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ ("body"). Height (): body may have a border that gets a higher height than $ (document). height () small;</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">$ ("html"). Height (): The meanings of the heights obtained on different browsers will vary, and the browser is not Compatible.</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">the <strong>$ (window). Height () value</strong> is not the height of the browser window returned?</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><br></p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px">This post is my Baidu blog move, Baidu blog Address: http://hi.baidu.com/confidence68/item/79ff67178126f54a6826bb61</p></p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; font-size:14px; font-family:Arial; color:rgb(54,46,43); line-height:26px"><br></p></p></span>

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.