Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

JavaScript Window Screen

JavaScript Window Screen


The window.screen object contains information about the user's screen.


Window Screen

window.screenThe object can be used without the window prefix when writing.

Some properties:


Window Screen available width

The screen.availWidth property returns the width of the visitor's screen in pixels, minus interface features such as the window taskbar.

Example

Return your screen's available width:

The above code outputs:

Try it »


Window Screen available height

The screen.availHeight property returns the height of the visitor's screen in pixels, minus interface features such as the window taskbar.

Example

Return your screen's available height:

The above code will output:

Try it »

All screen property examples