最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

deviceXDPI Property

Internet Development Index

Retrieves the actual number of horizontal dots per inch (DPI) of the system's screen.

Syntax

[ nActDPI = ] screen.deviceXDPI

Possible Values

nActDPIInteger 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 deviceXDPI property to retrieve the horizontal DPI of the screen.

This example uses the deviceXDPI and logicalXDPI properties to calculate the horizontal 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>
function fnScaleFactorX() {
var nScaleFactor = screen.deviceXDPI / screen.logicalXDPI;
return nScaleFactor;
}
</script>

This example uses the zoom property of the BODY element to adjust the scale of the page "manually" if Internet Explorer is not adjusting the scale of the screen and the user's horizontal 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>
// change layout on HighDPI screens when IE not scaling
function fnScaleManually()
{
// normal DPI
var constNorm = 96;
// scaling is off and DPI higher than normal
if ((screen.deviceXDPI == screen.logicalXDPI)
&& (screen.deviceXDPI > constNorm))
{
document.body.style.zoom =
constNorm / screen.logicalXDPI;
}
}
</script>

Applies To

screen

See Also

deviceYDPI, logicalXDPI, logicalYDPI
郯城县| 琼中| 治县。| 乌苏市| 松江区| 汉川市| 全南县| 调兵山市| 乌苏市| 恩平市| 卢湾区| 蒙阴县| 天峨县| 交城县| 博爱县| 玛沁县| 岱山县| 兴宁市| 高要市| 通州市| 黎城县| 比如县| 澳门| 太原市| 枣庄市| 团风县| 凤凰县| 嘉黎县| 通城县| 蚌埠市| 高安市| 鸡泽县| 石门县| 江阴市| 山东省| 遵义市| 蓬莱市| 治多县| 玉龙| 东莞市| 余庆县|