实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<h3>Your Screen:</h3>
6
7
<script>
8
document.write("Total width/height: ");
9
document.write(screen.width + "*" + screen.height);
10
document.write("<br>");
11
document.write("Available width/height: ");
12
document.write(screen.availWidth + "*" + screen.availHeight);
13
document.write("<br>");
14
document.write("Color depth: ");
15
document.write(screen.colorDepth);
16
document.write("<br>");
17
document.write("Color resolution: ");
18
document.write(screen.pixelDepth);
19
</script>
20
21
</body>
22
</html>