Monday, September 30, 2013

How to blink text in all browsers

Javascript:
<script type="text/javascript" language="javascript">
 window.onload=blinkOn;
 
function blinkOn()
{ document.getElementById("blink").style.color="Red";
  setTimeout("blinkOff()",1000);
}
 
function blinkOff()
{  document.getElementById("blink").style.color="";
  setTimeout("blinkOn()",1000);
} 
</script>


HTML
<div id="blink">Hello, World!</div>

Thanks to Steven McConnon

No comments: