JavaScript Reference/Javascript Properties/logicalXDPI

Материал из Web эксперт
Перейти к: навигация, поиск

"logicalXDPI" Example

    
<html>
<body>
<script language="JavaScript">
function function1() {
    var m = screen.logicalXDPI;
    var n = screen.logicalYDPI;
    alert("Screen XDPI =\n"+m); 
    alert("Screen YDPI =\n"+n); 
} 
</script>
<input type="button" value="Click me" onclick="function1();">
</body>
</html>



"logicalXDPI" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |screen                                                        |
+----------------+--------------------------------------------------------------+



"logicalXDPI" Syntax and Note

Note:
Read-only property. 
Returns the screen horizontal dpi (dots per inch).
    
Syntax:
    
screen.logicalXDPI