SoFunction
Updated on 2025-03-03

js get various properties of the browser

The visible area width of the web page: ;

The visible area height of the web page: ;

Width of visible area of ​​web page: (including the width of the edge line);

The visible area height of the web page: (including the width of the edge);

The full text of the web page is: ;

The full text of the web page is high: ;

The web page is rolled out high: ;

The left of the web page being rolled out: ;

On the main part of the web page: ;

Left part of the web page text: ;

High screen resolution: ;

Width of screen resolution: ;

The screen available workspace height: ;

Screen Available Workspace Width:;

scrollHeight: Gets the scroll height of the object.

scrollLeft: Set or get the distance between the left boundary of the object and the leftmost end of the currently visible content in the window

scrollTop: Set or get the distance between the top of the object and the top of the visible content in the window

scrollWidth: Get the scroll width of the object

offsetHeight: Gets the height of the object relative to the layout or the parent coordinate specified by the parent coordinate offsetParent property

offsetLeft: Gets the calculated left position of the object relative to the layout or parent coordinates specified by the offsetParent property

offsetTop: Gets the calculated top position of the object relative to the layout or the parent coordinate specified by the offsetTop property.

Horizontal coordinates relative to the document

Vertical coordinates relative to the document

Horizontal coordinates relative to the container

Vertical coordinates relative to container

The value of scrolling vertically

+ Horizontal coordinates relative to the document + the amount of scrolling in the vertical direction

To get the scrollbar vertical position of the current page, use:

;

Instead:

;

documentElement corresponds to the html tag, and body corresponds to the body tag

The above is all the content of this article. I hope that the content of this article will help you study or work. I also hope to support me more!