• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The screen Object

Another useful property of the window object is the screen property, which returns the screen object—which holds a great deal of information about the screen dimensions and color capabilities. You can see the various properties of the screen object in Table 7.3.

Table 7.3. The Properties of the screen Object
Property NS2 NS3 NS4 NS6 IE3a IE3b IE4 IE5 IE5.5 IE6
availHeight, availWidth   x x   x x x x
  Read-only
  The available height and width of the screen (omitting items such as the Windows taskbar) in pixels.
availLeft, availTop   x x   x x x x
  Read-only
  The available left and top positions on the screen (omitting items such as the Windows taskbar if positioned along the left edge of the screen, and so on) in pixels.
bufferDepth       x x x x
  Read/write
  If you set this property to -1 (the default is 0), the Internet Explorer will set its offscreen buffer to the same color depth as the screen.
colorDepth   x x   x x x x
  Read-only
  Holds the number of bits used to store a color in the screen. Same as pixelDepth.
fontSmoothingEnabled       x x x x
  Read/write
  Set to true if font smoothing is enabled, false otherwise. The default is false.
height, width   x x   x x x x
  Read-only
  The height and width of the screen in pixels.
pixelDepth   x x   x x x x
  Read/write
  Holds the number of bits used to store a color in the screen. Same as colorDepth.
updateInterval   x x   x x x x
  Read-only
  Holds the number of milliseconds between screen updates.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint