HTML and CSS Reference
In-Depth Information
Table 10.17 Properties of the screen Object (continued)
Property
What It Describes
availTop
The y coordinate of the first pixel, minus toolbars, and so on.
availWidth
The pixel width of the screen, minus toolbars, and so on.
colorDepth
The maximum amount of colors that the screen can display.
height
The pixel height of the screen.
pixelDepth
The number of bits per pixel of the screen.
width
The pixel width of the screen.
EXAMPLE 10.22
<html>
<head><title>Screen Properties</title></head>
<body bgcolor="orange"><font face="verdana">
<b>The Screen</b><br />
<table border=2>
<tr><th>Screen Property</th><th>Value</th></tr>
<tr>
<td>Height</td>
<td>
<script type="text/javascript">
1
document.write( screen.height );
</script>
</td>
</tr>
<tr>
<td>Available Height</td>
<td>
<script type="text/javascript">
2
document.write( screen.availHeight );
</script>
</td>
</tr>
<tr>
<td>Width</td>
<td>
<script type="text/javascript">
3
document.write( screen.width );
</script>
</td>
</tr>
Continues
 
Search WWH ::




Custom Search