<!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