window.screen

window.screen provides information about the desktop outside the browser.

For example the screen.colorDepth property contains the color bit-depth (the color quality) of the monitor.

window.screen.colorDepth //32

You can also check the available screen real estate (the resolution).
screen.width //1440
screen.availWidth //1440
screen.height //900
screen.availHeight //847

The difference between height and availHeight is that the height is the total resolution, while availHeight subtracts any operating system menus such as the Windows task bar. The same is the case for width and availWidth.

Screen Object Properties

PropertyDescription
availHeightReturns the height of the screen (excluding the Windows Taskbar)
availWidthReturns the width of the screen (excluding the Windows Taskbar)
colorDepthReturns the bit depth of the color palette for displaying images
heightReturns the total height of the screen
pixelDepthReturns the color resolution (in bits per pixel) of the screen
widthReturns the total width of the screen

Related Tutorial
2 window
Follow Us
https://www.facebook.com/Rookie-Nerd-638990322793530 # # # # #