Home >Web Front-end >JS Tutorial >Screen screen object in JavaScript_Basic knowledge

Screen screen object in JavaScript_Basic knowledge

WBOY
WBOYOriginal
2016-05-16 19:06:301477browse

This is the basic JavaScript screen object



screen The screen object reflects the current user's screen settings.

width Returns the width of the screen (number of 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 are not automatically hidden).

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