javaScript window screen object

the javascript screen object makes information about the client's display capabilities available to javaScript.

the window.screen object returns a reference to the screen object associated with the window. the screen object contains information about the visitor's screen.

the window.screen object can be written without the window perfix.

example

              var    height   =  window.screen.availHeight ;
              
              var    width    =         screen.availWidth ;

window screen available width and height

the screen.availheight property specifies the height of the screen, in pixels, minus permanent or semipermanent user interface features displayed by the operating system, such as the taskbar on windows.

the screen.availwidth property 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.

      document.write("available  width"+window.screen.availwidth);
      
      document.write('<br/>'+"available  height"+window.screen.availheight);

      // window.screen object can be written without window perfix

      document.write('<br/>'+"available  width"+screen.availwidth);
      
      document.write('<br/>'+"available  height"+screen.availheight);

the screen.height and screen.width properties return the total height and width of the screen in pixels.

      document.write('<br/>'+"total   width"+window.screen.width);
      
      document.write('<br/>'+"total   height"+window.screen.height);

screen colorDepth property

the colordepth property returns the bit depth of the color palette for displaying images(in bits per pixel).

note : the colordepth property is supported in all major browser.

      document.write('<br/>'+"color depth"+window.screen.colordepth);
      
      document.write('<br/>'+"pixel depth"+window.screen.pixeldepth);

the pixeldepth property returns the bit depth of the screen.