Home  >  Article  >  Web Front-end  >  JavaScript introductory tutorial (5) js Screen screen object_basic knowledge

JavaScript introductory tutorial (5) js Screen screen object_basic knowledge

WBOY
WBOYOriginal
2016-05-16 18:56:27920browse

screen screen object reflects the current user's screen settings.
width returns the width of the screen in pixels.
height returns the height of the screen.
availWidth returns the available width of the screen (excluding the width occupied by some things like the taskbar that do not automatically hide).
availHeight returns the available height of the screen.
colorDepth returns the number of bits used in the current color setting - 1: black and white; 8: 256 colors; 16: enhanced color; 24/32: true color
The following is the screen object of the English Navigator browser:
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.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn