Use of JavaScript's SetTimeOut()

Lakhangarg
Posted by Lakhangarg under JavaScript category on | Views : 2645
Used to executes a code after given interval.
setTimeout();

//Show alert message after 2 seconds.
setTimeout("alert('Execute after two seconds!')",2000);




To cancel the exection time set with the setTimeout().
clearTimeout();

Comments or Responses

Login to post response