화면의 픽셀 깊이를 반환하려면 screen.pixelDepth를 사용하세요. JavaScript의 속성
예시
다음 코드를 실행하여 JavaScript에서 픽셀 깊이를 얻을 수 있습니다.
<!DOCTYPE html>
<html>
<body>
<script>
document.write("Screen width: " + screen.width);
document.write("<br>Screen height: " + screen.height);
document.write("<br>Pixel Depth: " + screen.pixelDepth);
</script>
</body>
</html>