1
<script>
2
if (screen.colorDepth <= 8)
3
//为8位屏幕的简单的蓝色背景色
4
document.body.style.background = "#0000FF"
5
else
6
//为现代屏幕的华丽的蓝色背景色
7
document.body.style.background = "#87CEFA"
8
</script>
<script>
if (screen.colorDepth <= 8)
//为8位屏幕的简单的蓝色背景色
document.body.style.background = "#0000FF"
else
//为现代屏幕的华丽的蓝色背景色
document.body.style.background = "#87CEFA"
</script>