【代码教程】闪图背景html代码

2013-08-18 14:34:54 -0400
变色表格
«Newer      Older»

----Comments(1)----
天蚕土豆 (@135anzhuo) | @ at 2013-08-18 14:41:
代码如下:

<HTML>
<HEAD>
<TITLE>变色表格</TITLE>
<META content="text/html; charset=hz-gb-2312" http-equiv=Content-Type>
</HEAD>
<body>
<script>
l=Array(0,1,2,3,4,5,6,7,8,9,'a','b','b','c','d','e','f');
function f(y)
{
for(i=5;i<117;i++)
{
c=(i+y)%30;
if(c>15)
c=30-c;
eval("document.all[i].bgColor='00"+l[c]+l[c]+"00'");
}
y++;
setTimeout('f('+y+')','1');
}
function p(x)
{
document.write("<td> </td>");
x++;
if((x%10==1)&&(x%100!=1))
document.write("</tr><tr>");
if(x<101)
p(x);
else
{
document.write("</tr>");
f(1);
}
}
document.write("<body bgcolor=0><table width=300 height=300 border=0 cellpadding=0 cellspacing=0><tr>");
p(1);
</script>
</body>
</HTML>
Comment:
Name:

Back to home

Subscribe | Register | Login | N