JavaScript Client Series

Source: Internet
Author: User

<!DOCTYPE HTML><HTMLLang= "en"><Head>    <MetaCharSet= "UTF-8">    <title>Title</title>    <Scriptsrc= "Common.js"></Script>    <Script>        /** Offset Series: Gets the element's width, height, left,top, offsetParent * offsetwidth: The width of the element, has the border * offsetheight: element High, with Border * Offsetleft: The value of the element distance from the left position * OffsetTop: The value of the element distance above the position * * Scroll Series: The value of curl out * scroll Left: The distance that curls away * scrolltop: The distance to curl up * scrollwidth: The actual width of the content in the element (if there is little content, no content, the width of the element itself), no border * Scrollhei Ght: The actual height of the content in the element (if there is little or no content, the element itself is high), no border * * * Client series: Viewable area * clientwidth: Width of viewable area (no border), border Interior Width * clientheight: High (no border) of visible area, height inside border * clientleft: width of left border *clienttop: width of Upper Border * */    </Script>    <style>Div{width:200px;Height:210px;Border:20px Solid Red;Border-left-width:50px;        }    </style></Head><Body><DivID= "DV"></Div><Script>    //Console.log (my$ ("DV"). clientwidth);    //Console.log (my$ ("DV"). clientheight);    //Console.log (my$ ("DV"). ClientLeft);Console.log (my$ ("DV"). ClientTop);</Script></Body></HTML>

JavaScript Client Series

Related Article

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.