TOC PREV NEXT INDEX

domref



window.screen


Returns a reference to the screen object associated with the window.

Syntax

screenObj = window.screen
 

Parameters

screenObj is an object reference.

Example

s = window.screen;
 
if ( s.colorDepth < 8) {
 
    // use low-color version of page
 
} else { 
 
    // use regular, colorful page
 
}
 

Notes

The screen object is a special JavaScript object for controlling aspects of the screen on which the current window is being rendered. screen object properties such as colorDepth, height, and availHeight can be accessed from the window object by using properties like window.screen.colorDepth and others described below.

Specification

DOM Level 0. Not part of specification.
 


Netscape Communications
http://developer.netscape.com
TOC PREV NEXT INDEX