本文实例讲述了JavaScript让网页出现渐隐渐显背景颜色的方法。分享给大家供大家参考。具体如下:@H_301_1@
<Meta http-equiv="Content-Type" content="text/html; charset=gb2312">
javascript渐隐渐显的背景颜色
= 1) {
document.bgColor="#" +"00"+ Color[n] +"00";
n -= 1;
setTimeout("fadeIn("+n+")",100);
}
else{setTimeout('fadeOut(1)',100);}
}
function fadeOut(n) {
if (n <=(Color.length-1)) {
document.bgColor="#" +"00"+ Color[n] +"00";
n += 1;
setTimeout("fadeOut("+n+")",100)
}
else{setTimeout("fadeIn("+(Color.length-1)+")",100);}
}
//www.jb51.cc/