Client/scroll/offset width/height/top/left, scroloffset
Client/scroll/offset width/height/top/left (the box model is contentBox, and the origin is the intersection of the outermost layers of the border in the upper left corner of the element)
ClientWidth width + Left padding + right padding (if a vertical scroll bar exists, subtract 17px)
ClientHeight height + upper padding + lower padding (if a horizontal scroll bar exists, 17px is subtracted)
ClientTop border-top-width Upper border width
ClientLeft border-left-width left border width
OffsetHeight
OffsetWidth borderLeftWidth + paddingLeft + width + paddingRight + borderRightWidth
OffsetLeft: The left offset of the current element origin point relative to the inner point of the border in the upper left corner of the parent element.
OffsetTop the offset of the current element origin point relative to the top focus of the bottom border in the upper left corner of the parent Element
OffsetParent parent element relative to offset
ScrollHeight
If the element does not have a vertical scroll bar, paddingLeft + width + paddingRight.
If there is a vertical scroll bar, it is related to the width occupied by the content. The specific calculation is not clear yet.
ScrollWidth
Similar to the above
The length of the scrollLeft horizontal scroll bar.
Length of scrollTop vertical scroll bar rolled over
A js and css problem. Get the distance between the div of absolute and the body, that is, left and right.
To solve this problem, first confirm who your offsetParent is. If its parent level is set relative position, absolute, and fixed, then offsetParent is the tag, offsetLeft \ Top is the position relative to this tag. However, jquery is easy to get.
Var offsetobj = $ ("# aaa"). offset ();
Var left = offsetobj. left;
Var top = offsetobj. top;
How to store the DIV attribute (TOP, LEFT, HEIGHTWIDTH) into the database, and then read it and pay it to the DIV
<Script type = "text/javascript" language = "javascript">
<! --
Function checkBrowser ()
{
Var ClientInfo = "";
ClientInfo = ClientInfo + "userAgent:" + window. navigator. userAgent + "<br> ";
ClientInfo = ClientInfo + "appName:" + window. navigator. appName + "<br> ";
ClientInfo = ClientInfo + "appVersion:" + window. navigator. appVersion + "<br> ";
ClientInfo = ClientInfo + "appMinorVersion:" + window. navigator. appMinorVersion + "<br> ";
ClientInfo = ClientInfo + "appCodeName:" + window. navigator. appCodeName + "<br> ";
ClientInfo = ClientInfo + "platform:" + window. navigator. platform + "<br> ";
ClientInfo = ClientInfo + "language:" + window. navigator. language + "<br> ";
ClientInfo = ClientInfo + "userLanguage:" + window. navigator. userLanguage + "<br> ";
ClientInfo = ClientInfo + "cpuClass:" + window. navigator. cpuClass + "<br> ";
ClientInfo = ClientInfo + "onLine:" + window. navigator. onLine + "<br> ";
// ClientInfo = ClientInfo + "javaEnabled:" + window. navigator. javaEnabled + "<br> ";
ClientInfo =... the remaining full text>