Screen object
- Previous Page Window Navigator
- Next Page HTML Document
Window Screen Object
The screen object contains information about the visitor's screen.
Screen object properties
Property | Description |
---|---|
availHeight | Returns the height of the screen (excluding the Windows taskbar). |
availWidth | Returns the width of the screen (excluding the Windows taskbar). |
colorDepth | Returns the bit depth of the palette used to display images. |
height | Returns the total height of the screen. |
pixelDepth | Returns the color resolution (number of bits per pixel) of the screen. |
width | Returns the total width of the screen. |
Screen object description
Each screen property of a Window object refers to a Screen object. The Screen object contains information about the display browser screen. JavaScript programs will use this information to optimize their output to meet the display requirements of users. For example, a program can choose to use large images or small images based on the size of the display, and it can also choose to use 16-bit color or 8-bit color graphics based on the color depth of the display. Additionally, JavaScript programs can also position new browser windows in the center of the screen based on information about the screen size.
Other related properties
Property | Description |
---|---|
bufferDepth | Sets or returns the bit depth of the palette. |
deviceXDPI | Returns the number of horizontal points per inch on the display screen. |
deviceYDPI | Return the dot number per inch of the display screen in the vertical direction. |
fontSmoothingEnabled | Return whether the user has enabled font smoothing in the display control panel. |
logicalXDPI | Return the conventional dot number per inch in the horizontal direction of the display screen. |
logicalYDPI | Return the conventional dot number per inch in the vertical direction of the display screen. |
updateInterval | Set or return the refresh rate of the screen. |
- Previous Page Window Navigator
- Next Page HTML Document