测试颜色(#000-#fff)

版权声明:本文为博主原创文章,欢迎转载及传播,但请保留文章出处: https://blog.csdn.net/hdq1745/article/details/86168071

 

 

 

 

<html>
<head>
    <SCRIPT language=javascript>
            function makeArray(q) {
                for (i = 1; i <= q; i++) {
                    this[i] = 0
                }
            }
        Colors = new makeArray(6);
        Colors[1] = "00";
        Colors[2] = "33";
        Colors[3] = "66";
        Colors[4] = "99";
        Colors[5] = "CC";
        Colors[6] = "FF";
    </SCRIPT>
    <title>测试颜色</title>
    <style type="text/css">
        A {
            COLOR: black;
            FONT-SIZE: 9pt;
            FONT-WEIGHT: 400;
            TEXT-DECORATION: none
        }
    </style>
</head>
<body>
    <center>
        <table cellspacing=1 cellpadding=0>
            <SCRIPT language=javascript>
                for (i = 1; i <= 6; i++) {
                    for (j = 1; j <= 6; j++) {
                        for (k = 1; k <= 6; k++) {
                            var thiscolor = Colors[i] + Colors[j] + Colors[k];
                            document.writeln("<tr><td height = 20 bgcolor = \"#" + thiscolor + "\" align = right><a href = ");
                            document.writeln("\'\' onMouseOver = \"document.bgColor=\'" + thiscolor + "\'\">" + thiscolor + "</a></td></tr>");
                        }
                    }
                }
            </SCRIPT>
        </table>
    </center>
</body>
</html>

 

展开阅读全文

没有更多推荐了,返回首页