HTML DOM deviceXDPI Property

Definition and Usage

The deviceXDPI property returns the number of horizontal dots per inch on the display screen.

Syntax

screen.deviceXDPI

Example

<html>
<body>
<script type="text/javascript">
document.write("<p>Device XDPI: ")
document.write(screen.deviceXDPI + "</p>")
</script>
</body>
</html>