Dynamic Link Color Changer
<script Language="Javascript">
bname=navigator.appName;
bversion=parseInt(navigator.appVersion)
var z=0;
var rgb=0;
var message= new Array();
var value=0;
var timer1;
var timer2;
var timer3;
var convert = new Array()
var hexbase= new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F");
//Do not edit anything else in the Script except the lines below
var bgcolor="#FF0000"; //Fade color
var color="#0000FF"; //Starting color
var speed=55
//Do not edit anything else in the Script except the lines above
for (x=0; x<16; x++){
for (y=0; y<16; y++){
convert[value]= hexbase[x] + hexbase[y];
value++;
}
}
redx=color.substring(1,3);
greenx=color.substring(3,5);
bluex=color.substring(5,7);
hred=eval(parseInt(redx,16));
hgreen=eval(parseInt(greenx,16));
hblue=eval(parseInt(bluex,16));
eredx=bgcolor.substring(1,3);
egreenx=bgcolor.substring(3,5);
ebluex=bgcolor.substring(5,7);
ered=eval(parseInt(eredx,16));
egreen=eval(parseInt(egreenx,16));
eblue=eval(parseInt(ebluex,16));
red=ered;
green=egreen;
blue=eblue;
function start(){
timer1=window.setInterval('up()',speed)
}
function up(){
if (red
hred){
if ((red-15)>hred){
red-=15;
redx = convert[red]
}
else{
red=hred
redx = convert[red]
}
}
if (greenhgreen){
if ((green-15)>hgreen){
green-=15;
greenx = convert[green]
}
else{
green=hgreen
greenx = convert[green]
}
}
if (bluehblue){
if ((blue-15)>hblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=hblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
document.linkColor=rgb;
document.vlinkColor=rgb;
if (z>19){
window.clearInterval(timer1);
timer2=window.setInterval('down()',speed)
}
else
z++
}
function down(){
if (redered){
if ((red-15)>ered){
red-=15;
redx = convert[red]
}
else{
red=ered
redx = convert[red]
}
}
if (greenegreen){
if ((green-15)>egreen){
green-=15;
greenx = convert[green]
}
else{
green=egreen
greenx = convert[green]
}
}
if (blueeblue){
if ((blue-15)>eblue){
blue-=15;
bluex = convert[blue]
}
else{
blue=eblue
bluex = convert[blue]
}
}
rgb = "#"+redx+greenx+bluex;
document.linkColor=rgb;
document.vlinkColor=rgb;
if (z>38){
z=0;
window.clearInterval(timer2);
timer1=window.setInterval('up()',speed);
}
else
z++
}
// done hiding -->
</script>
精彩世界空間無(wú)限