Screen

The screen object contains a number of read-only properties that provide information about the computer screen used to view a web page.

Properties

availHeight, availWidth

FF, IE 4

Read-only: Available height and width of the screen, in pixels. Excludes the taskbar in Windows systems and any other permanent screen elements.

Example:

var screen_height = screen.availHeight;

height, width

FF, IE 4

Read-only: Height and width of the screen in pixels

colorDepth

FF, IE 4

Read-only: Number of colors on the screen (bits per pixel in IE, natural log in FF)

pixelDepth

FF, IE 4

Read-only: Bits per pixel

Get The Book of JavaScript, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.