News:

MyKidsDiary.in :: Capture your kids magical moment and create your Online Private Diary for your kids

Main Menu

Change background color after 5 seconds

Started by karthick, Apr 09, 2008, 11:19 AM

Previous topic - Next topic

karthick

Change background color after 5 seconds

<html>
<head>
<script language=javascript>
var count=0;
function as()
{
setTimeout("fun1()",5000);
}
function fun1()
{
var a =new
Array("red","darkblue","sky","yellow","blue","pink","green");
if(count<=6)
{
document.bgColor=a[count++];
setTimeout("fun1()",5000);
}
else
{
count=0;
as();
}
}
</script>
</head>
<body bgcolor=gray onload=as()>
</body>
</html>
A part of Development in Our Website Front Page
www.itacumens.com

We simple build everything with sense
----karthick....