JavaScript Kit > JavaScript Reference > Here
Screen Object
Use the screen
object of JavaScript to derive basic information about the user's screen, such as dimensions.
Related Tutorials
Properties
Properties | Description |
---|---|
availWidth | Specifies the width of the screen, in pixels, minus interface features such as the taskbar in Windows. |
availHeight |
Specifies the height of the screen, in pixels, minus interface features such as the taskbar in Windows. A practical usage of this property is to open a window using JavaScript that's maximized to the user's entire screen while not covering up the Windows taskbar, since availWidth and availHeight factors them out in their values.
Demo: Open JavaScript Reference <script type="text/javascript"> |
colorDepth |
The bit depth of the color palette available for displaying images in bits per pixel. Using this property, you can test for 8 bit screens for example, which are limited as far as the range of colors they can display"
<script type="text/javascript"> |
pixelDepth
-Mozilla/Firefox specific property |
Display screen color resolution (bits per pixel). Interchangeable with screen.colorDepth above in terms of value returned. |
width | The total width of the screen, in pixels. |
height | The total height of the screen, in pixels. |
- JavaScript Operators
- JavaScript Statements
- Global functions
- JavaScript Events
- Escape Sequences
- Reserved Words