文字在黑色背景中逐渐消失
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb_2312-80">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
<title>sieye *山西.襄垣</title>
</head>
<body>
<br><br><!--下面为演示代码-->
<p align="center"><font color="#0080FF" size="5">文字逐渐消失</font></p>
<div id=my style="position:absolute;background-color:#000000;width:100;height:10;left:100;top:400;color:#000000">文字逐渐消失</div>
<script language="JavaScript">
var c1=15;
var c2=15;
function getnum(num){
if (num<10){return num;}
else{ if(num==10)return "A";
if(num==11)return "B";
if(num==12)return "C";
if(num==13)return "D";
if(num==14)return "E";
if(num==15)return "F";
}
}
function divchan(){
color1=getnum(c1);
color2=getnum(c2);
mycolor="#00"+color1+color2+"00";
document.all.my.style.color=mycolor;
c2--;
if(c2<0){c1--;c2=15;}
if(c1<0)c1=15;
setTimeout("divchan()",100);
}
divchan();
</script>
<br><br><!--以上为演示代码-->
<p align="right"><a href="http://www.sieye.cn">人之初 电脑爱号家园</a><br>山西.襄垣 </p><br><br><br><br>
</body>
</html>