Here you are:
Code:
<html>
<head>
<title>Nile Good</title>
<script type="text/javascript">
var i=0;
function flash(divid,background,color,speed)
{
div=document.getElementById(divid);
bg="white"; //Here goes your background for your text when not blinking
cr="black"; //Here does your color for your text when not blinking
if(i%2==0)
{
div.style.background=background;
div.style.color=color;
}else{
div.style.background=bg;
div.style.color=cr;
}
if(i>1)
{
i++;
}else{
i--;
}
setTimeout("flash('"+divid+"','"+background+"','"+color+"')",speed);
}
</script>
</head>
<body onload="flash('my','#F2F200','#5700EF','10');flash('new','#ef5678','#876789','500');flash('new2','#ED0000 ','#ffffff','1000');">
<div id="my">This text should flash blue with a yellow background at the reate of 10 milliseconds</div>
<div id="new">This text should flash black with a red background at the rate of 500 milliseconds.</div>
<div id="new2">This text should flash white with a red background at the rate of 1000 milliseconds</div>
</body>
</html>
Bookmarks