七彩渐变条,漂亮的那种(1)

发表于:2007-06-30来源:作者:点击数: 标签:
html head title七彩渐变条/title meta http-equiv=Content-Type content=text/html; charset=gb2312 Script language= Java Script var bg=new Array(); bg[0]=#ffffff ; bg[1]=# CC FFCC ; bg[2]=#00FF00 ; bg[3]=#33CC33 ; bg[4]=#009933 ; bg[5]=#006600
<html>
<head>
<title>七彩渐变条</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Script language="JavaScript">
var bg=new Array();
    bg[0]="#ffffff" ;
    bg[1]="#CCFFCC" ;
    bg[2]="#00FF00" ;
    bg[3]="#33CC33" ;
    bg[4]="#009933" ;
    bg[5]="#006600" ;
    bg[6]="#003300" ;
    bg[7]="#3399FF" ;
    bg[8]="#0066FF" ;
    bg[9]="#0000FF" ;
    bg[10]="#3333CC";
    bg[11]="#333399";
    bg[12]="#000066";
    bg[13]="#FFFF66";
    bg[14]="#FFCC00";
    bg[15]="#FF9900";
    bg[16]="#CC6600";
    bg[17]="#CC3300";
    bg[18]="#800000";

var j=0
function changecolorx()
{
        for(i=0;i<document.all.mytable.rows[0].cells.length;i++){
            k=Math.abs((i-j))%18
            document.all.mytable.rows[0].cells[i].bgColor=bg[k]
        }
    j++;
    setTimeout("changecolorx()",50)

}

</Script>
</head>

<body bgcolor="#FFFFFF" onload="setTimeout(@#changecolorx()@#,1000)";>
<table border="0" width="100%" cellspacing="0" cellpadding="1" id="mytable" style="border:5px

dashed RGB(128,0,0);">
  <tr height="10" bgcolor="#000000">
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>
</body>
</html>

原文转自:http://www.ltesting.net