手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >JavaScript中的Screen屏幕对象
JavaScript中的Screen屏幕对象
摘要:这是基本JavaScript的屏幕对象screen屏幕对象反映了当前用户的屏幕设置。width返回屏幕的宽度(像素数)。height返回屏幕...

这是基本JavaScript的屏幕对象

screen屏幕对象反映了当前用户的屏幕设置。

width返回屏幕的宽度(像素数)。

height返回屏幕的高度。

availWidth返回屏幕的可用宽度(除去了一些不自动隐藏的类似任务栏的东西所占用的宽度)。

availHeight返回屏幕的可用高度。

colorDepth返回当前颜色设置所用的位数-1:黑白;8:256色;16:增强色;24/32:真彩色

下面是英文的Navigator浏览器的屏幕对象:

availHeight:minuspermanentorsemipermanentuserinterfacefeaturesdisplayedbytheoperatingsystem:suchastheTaskbaronWindows.

availWidth:Specifiesthewidthofthescreen,inpixels,minuspermanentorsemipermanentuserinterface:featuresdisplayedbytheoperatingsystem,suchastheTaskbaronWindows.

colorDepth:Thebitdepthofthecolorpalette,ifoneisinuse;otherwise,thevalueisderivedfromscreen.pixelDepth.

height:Displayscreenheight.

pixelDepth:Displayscreencolorresolution(bitsperpixel).

width:Displayscreenwidth.

【JavaScript中的Screen屏幕对象】相关文章:

JavaScript获得url查询参数的方法

javaScript中with函数用法实例分析

JavaScript实现斗地主游戏的思路

javascript常用的方法分享

JavaScript中的Math.SQRT1_2属性使用简介

JavaScript中string对象

JavaScript操作Cookie方法实例分析

JavaScript中的私有成员

JavaScript中的small()方法使用详解

JavaScript中操作字符串小结

精品推荐
分类导航