JavaScript语言参考手册_窗口

JavaScript

 
 JavaScript手册 
目录
此参考中包含
的内容
轻松上手
简介
操作符
语句
核心
文档
窗口
表单
浏览器
事件和
事件句柄
LiveWire
数据库服务
进程管理服务
实用工具
全局函数
LiveConnect
的Java包
索引
版权
 
【目录】 【上一页】 【下一章】 【索引】

screen

包含了描述显示屏幕和颜色的属性。

客户端对象
实现版本 Navigator 4.0

创建源

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

描述

该对象包含了允许你获取关于用户显示情况信息的只读属性。

属性概览

availHeight 以像素为单位指定了屏幕的高度,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.

示例

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.

属性源 screen
实现版本 Navigator 4.0

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.

属性源 screen
实现版本 Navigator 4.0

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.

属性源 screen
实现版本 Navigator 4.0

height

Display screen height, in pixels.

属性源 screen
实现版本 Navigator 4.0

pixelDepth

Display screen color resolution, in bits per pixel.

属性源 screen
实现版本 Navigator 4.0

width

Display screen width, in pixels.

属性源 screen
实现版本 Navigator 4.0


【目录】 【上一页】 【下一章】 【索引】

回页面顶部