JavaScript
发布时间:2022-04-16 发布网站:大佬教程 code.js-code.com
大佬教程收集整理的这篇文章主要介绍了JavaScript让网页出现渐隐渐显背景颜色的方法,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
本文实例讲述了JavaScript让网页出现渐隐渐显背景颜色的方法。分享给大家供大家参考。具体如下:
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
);}
}
//cn.js-code.com/