Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Retrieves the actual number of vertical dots per inch (DPI) of the system's screen.
Syntax
[ nActDPI = ] screen . deviceYDPIPossible Values
nActDPI | Integer that receives the DPI. |
The property is read-only. The property has no default value.
Remarks
On most systems, there is no difference between horizontal and vertical DPI.
For information about how Internet Explorer 6 and later can adjust the scale of the display on screens with higher-than-normal DPI, see Adjusting Scale for Higher DPI Screens .
Examples
The following examples use the deviceYDPI property to retrieve the vertical DPI of the screen.This example uses the deviceYDPI and logicalYDPI properties to calculate the vertical scale factor that Internet Explorer is applying. The function in this example returns 1 if Internet Explorer is not adjusting the scale of the screen.
<script>This example uses the zoom property of the BODY element to adjust the scale of the document "manually" if Internet Explorer is not adjusting the scale of the screen and the user's vertical DPI is higher than normal. This is a simple but imprecise way to make a document look the same on higher resolution screens. You can achieve finer control over the layout of your documents by modifying the properties of individual elements or groups of elements.
<script>
Applies To
|
screen |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |