编辑下面的代码:【加编码】
<html> <body> <script> if (screen.colorDepth<=8) //simple blue background color for 8 bit screens document.body.style.background="#0000FF" else //fancy blue background color for modern screens document.body.style.background="#87CEFA" </script> </body> </html>
结果: 【此窗口】 帮助?
Try it Yourself - © 自强学堂