How to distinguish between height, offsetheight, client

How to distinguish between height, offsetheight, client
A. OffsetTop property:
This property can obtain elements on the outer edge distance from the nearest positioned parent element using wall, if the parent element does not use positioning, it is acquiring from the outer edge of the document from the inner wall.
The return value is an integer, in pixels. Read-only
two. The offsetLeft properties:
Principle and offsetTop This property is the same as
three. OffsetWidth properties:
can get width of the element, the width of the value of this attribute comprises: padding element content + + borders. It does not include margins and scroll bars section.
The return value is an integer, in pixels.
This property is read-only.
Four offsetHeight property:
This property may be acquired height of the element, height values comprising: padding element content + + borders; does not include margins and a scroll bar portion.
The return value is an integer, in pixels. Readonly
V. clientWidth property:
This property can be returned width value of an element, the value is: padding + content of the element; does not include borders, margins, and the scroll bar portion.
The return value is an integer, in pixels.
This property is read-only.
Six. The clientHeight property:
This property may return the value of the height of an element, the value is: padding + content of the element. Not including borders, margins and scroll bars section.
The return value is an integer, in pixels.
This property is read-only.
Seven .scrollLeft property:
This property can get or set the leftmost object to the distance of the object within the scope of the current window is displayed on the left, that is, the element is a scroll bar to the left to pull away.
The return value is an integer, in pixels.
This property is readable and writable.
Eight. ScrollTop property:
This property can get or set objects to the top-most object is the current top window in the range of from [] side, i.e. the scroll bar element is pulled downwardly away!.
The return value is an integer, in pixels.
This property is readable and writable

Guess you like

Origin blog.51cto.com/14419253/2427369