泉州浮桥网页设计培训班实例笔记HTML DOM 实例(九)-Screen 对象

Screen 对象

检测有关客户机的屏幕的细节

<html>

<body>

<script type=”text/javascript”>

document.write(“Screen resolution: “)

document.write(screen.width + “*” + screen.height)

document.write(“<br />”)

document.write(“Available view area: “)

document.write(screen.availWidth + “*” + screen.availHeight)

document.write(“<br />”)

document.write(“Color depth: “)

document.write(screen.colorDepth)

document.write(“<br />”)

document.write(“Buffer depth: “)

document.write(screen.bufferDepth)

document.write(“<br />”)

document.write(“DeviceXDPI: “)

document.write(screen.deviceXDPI)

document.write(“<br />”)

document.write(“DeviceYDPI: “)

document.write(screen.deviceYDPI)

document.write(“<br />”)

document.write(“LogicalXDPI: “)

document.write(screen.logicalXDPI)

document.write(“<br />”)

document.write(“LogicalYDPI: “)

document.write(screen.logicalYDPI)

document.write(“<br />”)

document.write(“FontSmoothingEnabled: “)

document.write(screen.fontSmoothingEnabled)

document.write(“<br />”)

document.write(“PixelDepth: “)

document.write(screen.pixelDepth)

document.write(“<br />”)

document.write(“UpdateInterval: “)

document.write(screen.updateInterval)

document.write(“<br />”)

</script>

</body>

</html>

发表评论

电子邮件地址不会被公开。 必填项已用*标注