当前位置: 首页 > 图文教程 > 网络编程 > Javascript > JavaScript中的Screen屏幕对象

Javascript
用js实现终止浏览器对页面HTML的继续解析即停止解析 兼容firefox
Auntion-TableSort国人写的一个javascript表格排序的东西
javascript实现二分查找法实现代码
利用ASP发送和接收XML数据的处理方法与代码
兼容ie和firefox的鼠标经过(onmouseover和onmouseout)实现--简短版
javascript之文本框输入四个数字自动加空格的脚本
比较简单实用的使用正则三种版本的js去空格处理方法
比较简洁的JavaScript 实时显示时间的脚本 修正版
JavaScript检查表单是否为空的函数
window.open被浏览器拦截后的自定义提示效果代码
javascript跟随鼠标的文字带滚动效果
让插入到 innerHTML 中的 script 跑起来的代码
Flash+XML滚动新闻代码 无图片 附源码下载
javascript(js) join函数使用方法介绍
表格头固定而列可滚动的效果
document.designMode的功能与使用方法介绍
精解window.setTimeout()&window.setInterval()使用方式与参数传递问题!
用javascript实现的电信铁通(网通)自动跳转源代码
用js查找法实现当前栏目的高亮显示的代码
javascript之鼠标拖动位置互换效果代码

Javascript 中的 JavaScript中的Screen屏幕对象


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