过期作废 发表于 2007-4-27 10:11:16

***综合类***闪亮边框的表格

把下列代码加到网页的<body></body>标签之间 从google下载我的照片管理软件
要完成此效果把如下代码加入到<body>区域中

<script language="javascript">
var line=new array();
var w=35;   // 一条边框的小格的个数(所以是个正方形啦)
var left=280;// 这个是边框在页面中的位置的左上角的x坐标
var top=10;   // 自然就是纵坐啦
var width=4;// 边框中一小格的象素宽
var height=3;// 边框的高度,设为1的话就是一条细线了
line="ff"+number(25).tostring(16)+number(25).tostring(16);
line="ff"+number(50).tostring(16)+number(50).tostring(16);
line="ff"+number(75).tostring(16)+number(75).tostring(16);
line="ff"+number(100).tostring(16)+number(100).tostring(16);
line="ff"+number(125).tostring(16)+number(125).tostring(16);
line="ff"+number(150).tostring(16)+number(150).tostring(16);
line="ff"+number(175).tostring(16)+number(175).tostring(16);
line="ff"+number(200).tostring(16)+number(200).tostring(16);
line="ff"+number(225).tostring(16)+number(225).tostring(16);

line="ff"+number(225).tostring(16)+number(225).tostring(16);
line="ff"+number(225).tostring(16)+number(225).tostring(16);
line="ff"+number(225).tostring(16)+number(225).tostring(16);
line="ff"+number(200).tostring(16)+number(200).tostring(16);
line="ff"+number(175).tostring(16)+number(175).tostring(16);
line="ff"+number(150).tostring(16)+number(150).tostring(16);
line="ff"+number(125).tostring(16)+number(125).tostring(16);
line="ff"+number(100).tostring(16)+number(100).tostring(16);
line="ff"+number(75).tostring(16)+number(75).tostring(16);
line="ff"+number(50).tostring(16)+number(50).tostring(16);
line="ff"+number(25).tostring(16)+number(25).tostring(16);

function writes(num)
{
    var temp;
    var s;
    var tl,tt;
    var tw,th;
    temp=num+1;
    if(num==0)
    {
      tl = left;
      tt = top;
      tw = w*width;
      th = height;
      s="<table style='position: absolute; left: "+tl+"px; top: "+tt+"px; width: "+tw+"px; height: "+th+"px;' cellspacing='0' cellpadding='0'><tr>";
      for(r=0;r<w;r++)
      {
      temp=r+w*num;
      s+="<td id=tab"+temp+" bgcolor=red></td>";
      }
      s+="</tr></table>";
    }
    if(num==1)
    {
      tl = left+w*width;
      tt = top;
      tw = height;
      th = w*width;
      s="<table style='position: absolute; left: "+tl+"px; top: "+tt+"px; width: "+tw+"px; height: "+th+"px;' cellspacing='0' cellpadding='0'>";
      for(r=0;r<w;r++)
      {
      temp=r+w*num;
      s+="<tr><td id=tab"+temp+" bgcolor=red></td></tr>";
      }
      s+="</table>";
    }
    if(num==2)
    {
      tl = left+height;
      tt = top+w*width;
      tw = w*width;
      th = height;
      s="<table style='position: absolute; left: "+tl+"px; top: "+tt+"px; width: "+tw+"px; height: "+th+"px;' cellspacing='0' cellpadding='0'><tr>";
      for(r=w;r>0;r--)
      {
      temp=r-1+w*num;
      s+="<td id=tab"+temp+" bgcolor=red></td>";
      }
      s+="</tr></table>";
    }
    if(num==3)
    {
      tl = left;
      tt = top+height;
      tw = height;
      th = w*width;
      s="<table style='position: absolute; left: "+tl+"px; top: "+tt+"px; width: "+tw+"px; height: "+th+"px;' cellspacing='0' cellpadding='0'>";
      for(r=w;r>0;r--)
      {
      temp=r-1+w*num;
      s+="<tr><td id=tab"+temp+" bgcolor=red></td></tr>";
      }
      s+="</table>";
    }
    return s;
}
function count()
{
    var i;
    var temp;
    var total;
    total = w*4;
    for(i=0; i<line.length; i++)
    {
      temp=pos+i-line.length/2;
      temp=temp<0?(total+temp):temp;
      temp=temp>(total-1)?(temp-total):temp;
      document.all["tab"+temp].style.backgroundcolor=line;
    }
    pos=(pos+1)>total?0:(pos+1);
}

for(i=0;i<=3;i++)
{
    document.write(writes(i));
}
var pos=0;
setinterval("count()", 1);
</script>
      










--------------- -----------------------

拥有三人行论坛管理系列软件,一个人就可以 管理一个论坛的更 新维护。还能使您的 论坛有千人在线的真实火暴效果,让您不 在为论坛因没有人气而留不住会 员而烦恼,使您的论坛早日 成为一流的论坛。详情请登陆网站:http://www.cnsrx.cn   三人行论坛管理软件,站长必备的专业 好工具。(您使用的是免费版本,购买收费版本后,将不带 广告。业务QQ:24 7216 4498 5227)
页: [1]
查看完整版本: ***综合类***闪亮边框的表格