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

Javascript
地震发生中逃生十大法则
引用文章链接代码复制自动加链接功能
javascript用层模拟可移动的小窗口
模仿动画的放大缩小容器
li隔行换色效果代码升级版
li隔行换色改进版
弹出提示的效果代码
直接生成打开窗口代码,不必下载
yahoo首页伸缩效果代码
js模拟QQ窗口的抖动效果
Dom加载让图片加载完再执行的脚本代码
js下拉框里超过变成省略号
Javascript模块模式分析
用函数式编程技术编写优美的 JavaScript_ibm
比较不错的函数式JavaScript编程指南教程
javascript程序优化问题
认识延迟时间为0的setTimeout
JavaScript的9个陷阱及评点分析
显示服务器时间的在线时钟代码简单
js几个广告轮换广告代码

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


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