当前位置: 首页 > 图文教程 > 网络编程 > Javascript > JavaScript入门教程(5) js Screen屏幕对象

Javascript
javascript prototype的深度探索不是原型继承那么简单
兼容Firefox和IE的onpropertychange事件oninput
javascript兼容firefox的文本输入长度提示
js字符编码函数区别分析
js程序中美元符号$是什么
javascript 数组的方法集合
javascript编程必备_JS语法字典
javascript动画效果打开/关闭层
javascript键盘事件全面控制脚本代码
javascript键盘上下键的操作(选择)
JavaScript容错例外处理
js将网址转为urlencode类型
JScript中使用ADODB.Stream判断文件编码的代码
[原创]js循环输出图片,不足的要补0
js left,right,mid函数
javascript 网站常用的iframe分割
javascript下兼容firefox选取textarea文本的代码
JSON学习笔记
asp.net和asp下ACCESS的参数化查询
JavaScript入门学习书籍推荐

Javascript 中的 JavaScript入门教程(5) js Screen屏幕对象


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 246 ::
收藏到网摘: n/a

这是基本JavaScript的屏幕对象

screen 屏幕对象 反映了当前用户的屏幕设置。
width 返回屏幕的宽度(像素数)。
height 返回屏幕的高度。
availWidth 返回屏幕的可用宽度(除去了一些不自动隐藏的类似任务栏的东西所占用的宽度)。
availHeight 返回屏幕的可用高度。
colorDepth 返回当前颜色设置所用的位数 - 1:黑白;8:256色;16:增强色;24/32:真彩色
下面是英文的Navigator浏览器的屏幕对象:
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.