教程·Javascript 中文手册
包含了描述显示屏幕和颜色的属性。
| 客户端对象 | -- |
| 实现版本 | Navigator 4.0 |
The JavaScript runtime engine creates the screen object for you. You can access its properties automatically.
该对象包含了允许你获取关于用户显示情况信息的只读属性。
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
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.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |
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.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |
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.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |
Display screen height, in pixels.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |
Display screen color resolution, in bits per pixel.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |
Display screen width, in pixels.
| 属性源 | screen |
| 实现版本 | Navigator 4.0 |