Visible area width of the webpage: document. body. clientWidth
Visible area height: document. body. clientHeight
Visible area width of the webpage: document. body. offsetWidth (including the width of the edge)
Visible area height of the webpage: document. body. offsetHeight (including the width of the edge)
Webpage text width: document. body. scrollWidth
Webpage text height: document. body. scrollHeight
The height of the page to be rolled: document. body. scrollTop
Left: document. body. scrollLeft
Page body: window. screenTop
Page body part left: window. screenLeft
Screen Resolution height: window. screen. height
Screen Resolution width: window. screen. width
Available screen workspace Height: window. screen. availHeight
Available workspace width: window. screen. availWidthVar t = "";
Obtain the mouse position:
Event. clientX is the distance from the mouse to the left side of the browser, event. clientY is the distance from the mouse village to the edge of the page, but positioning is not only this way, you need to consider that the current page coordinate is not the location of the mouse (such as dragging the webpage scroll bar to the bottom right ), therefore, we need to add the following content:
Var x = event. clientX + document. body. scrollLeft;
Var y = event. clientY + document. body. scrollTop;
Extends umentElement. scrollTop and document.doc umentElement. scrollLeft. Otherwise, the scroll value is 0.