JavaScript Reference/Javascript Objects/screen

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

"screen" Example

   <source lang="javascript">
   

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


     </source>
   
  


"screen" is applied to

   <source lang="javascript">

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

     </source>
   
  


"screen" JavaScript Properties

   <source lang="javascript">

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

     </source>
   
  


"screen" Syntax and Note

   <source lang="javascript">

Note: Information regarding the computer screen.

Syntax:

window.screen.memberName


     </source>