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:
- screen.availWidth - the available screen width
- screen.availHeight - the available screen height
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 »