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

Javascript
常用JS加密编码算法代码
js之完全兼容ie与firefox的拖动层代码[测试好用]
用javascript getComputedStyle获取和设置style的原理
ppk谈JavaScript style属性
JavaScript更改class和id的方法
js数据向上翻滚_数据滚动
javascript弹出一个层并增加一个覆盖层
可浮动QQ在线客服
jabsorb笔记_几个小例子
js快速与任意QQ号码建立临时对话
javascript得到XML某节点的子节点个数的脚本
js验证符合用户体验的网页表单特效
限制复选框的最大可选数的js代码
Javascript调试脚本的经验之谈
用js统计用户下载网页所需时间的脚本
javascript表单域与json数据间的交互
Javascript循环绑定事件的示例代码
表单Form的submit事件不响应的解决方法
JAVASCRIPT下判断IE与FF的比较简单的方式
javascript检查日期格式的函数[比较全]

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-09-12   浏览: 194 ::
收藏到网摘: 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.