Полезная информация

Table of Contents | Previous | Next | Index


screen

Contains properties describing the display screen and colors.

Client-side object

Implemented in

JavaScript 1.2

Created by

The JavaScript runtime engine creates the screen object for you. You can access its properties automatically.

Description

This object contains read-only properties that allow you to get information about the user's display.

Property Summary

Method Description
availHeight

Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

availWidth

Specifies the width of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

colorDepth

The bit depth of the color palette, if one is in use; otherwise, the value is derived from screen.pixelDepth.

height

Display screen height.

pixelDepth

Display screen color resolution (bits per pixel).

width

Display screen width.

Method Summary

This object inherits the watch and unwatch methods from Object.

Examples

The following function creates a string containing the current display properties:

function screen_properties() {
   document.examples.results.value = "("+screen.width+" x
      "+screen.height+") pixels, "+
      screen.pixelDepth +" bit depth, "+
      screen.colorDepth +" bit color palette depth.";
} // end function screen_properties

availHeight

Specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

Property of

screen

Implemented in

JavaScript 1.2


availWidth

Specifies the width of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the Taskbar on Windows.

Property of

screen

Implemented in

JavaScript 1.2


colorDepth

The bit depth of the color palette in bits per pixel, if a color palette is in use. Otherwise, this property is derived from screen.pixelDepth.

Property of

screen

Implemented in

JavaScript 1.2


height

Display screen height, in pixels.

Property of

screen

Implemented in

JavaScript 1.2


pixelDepth

Display screen color resolution, in bits per pixel.

Property of

screen

Implemented in

JavaScript 1.2


width

Display screen width, in pixels.

Property of

screen

Implemented in

JavaScript 1.2


Table of Contents | Previous | Next | Index

Last Updated: 11/16/98 12:57:14

Copyright ╘ 1998 Netscape Communications Corporation