JavaScript Reference/Javascript Objects/screen

Материал из Web эксперт
Перейти к: навигация, поиск

"screen" Example

    
<html>
<body>
<button onclick="alert(screen.width + "x" + screen.height);">
Screen resolution
</button>
</body>
</html>



"screen" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |window                                                        |
+----------------+--------------------------------------------------------------+



"screen" JavaScript Properties

+----------------+--------------------------------------------------------------+
| JavaScript     |availHeight                     availLeft                     |
| Properties     |availTop                        availWidth                    |
|                |bufferDepth                     colorDepth                    |
|                |deviceXDPI                      deviceYDPI                    |
|                |fontSmoothingEnabled            height                        |
|                |logicalXDPI                     logicalYDPI                   |
|                |updateInterval                  width                         |
+----------------+--------------------------------------------------------------+



"screen" Syntax and Note

Note:
Information regarding the computer screen.
    
Syntax:
    
window.screen.memberName