JavaScript中的Screen屏幕对象
JavaScript中的Screen屏幕对象
发布时间:2016-12-30 来源:查字典编辑
摘要:这是基本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教程学习
热门Javascript教程学习
编程开发子分类