This option will reset the home page of this site. Restoring any closed widgets or categories.

Reset

Javascript setTimeout() Tricks

Hi here we can see how we can call fucnctions using some timers available in javascript.

<script type=”text/javascript”>

function setToRed()
{
document.getElementById(“colourButton”).style.color = “#FF0000″;
setTimeout ( “setToBlack()”, 2000 );
}

function setToBlack()
{
document.getElementById(“colourButton”).style.color = “#000000″;
setTimeout ( “setToRed()”, 2000 );
}

</script>

<input type=”button” name=”clickMe” id=”colourButton” value=”Click me and wait!”

onclick=”setToRed()”/>

 

VN:F [1.5.7_846]
Rating: 0.0/10 (0 votes cast)
VN:F [1.5.7_846]
Rating: 0 (from 0 votes)

Related posts:

  1. Javascript Title Bar Message Changer
  2. How to create and use google robots.txt simple tricks
  3. Windows Tips and Tricks

Leave a Reply

Comments (required)

Spam Protected