Displaying the Properties of the Screen Object : Screen « Window Browser « JavaScript DHTML






Displaying the Properties of the Screen Object

<HTML>
<HEAD>
<TITLE>Test</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function displayScreenProperties() {
 with(document) {
  write("<B>height: </B>")
  writeln(screen.height+"<BR>")
  write("<B>width: </B>")
  writeln(screen.width+"<BR>")
  write("<B>colorDepth: </B>")
  writeln(screen.colorDepth+"<BR>")
 }
}
displayScreenProperties()
</SCRIPT>
</HEAD>
<BODY>
</BODY>
</HTML>
           
       








Related examples in the same category

1.Screen update Interval
2.Screen 'width' Example
3.Screen font Smoothing Enabled
4.Screen 'colorDepth' Example
5.Screen 'bufferDepth' Example
6.'height-2' Example
7.'logicalYDPI' Example
8.'logicalXDPI' Example
9.'deviceXDPI' Example
10.'deviceYDPI' Example
11.Screen 'availWidth'
12.Screen 'availTop'
13.Screen 'availHeight'
14.Screen availLeft
15.Detect the client's screen
16.Using the const Keyword