setTimeout | References Javascript | Javascript | centre-equestre-lepuy.com ..


Sponsored Links

setTimeout

The setTimeout () method is used to execute the instructions of code after a certain time interval. The syntax of setTimeout () is rather simple because the method in question allows only two arguments:

  • instruction code or name of the function to be performed;
  • time (in milliseconds) after which follow the instructions passed in the first argument.
Here's an example:
 



 setTimeout ("alert ('centre-equestre-lepuy.com')", 3000);

 
The sample code opens a window alert after 3 seconds.

Similar to setTimeout () is the setInterval () method that runs the code once but several times at intervals of time.

The implementation of setTimeout () method can be blocked by clearTimeout () .

In the same category ...
E-Learning
CSS (Course) CSS (Course)
Web Design and Accessibility according to W3C CSS and XHTML. Starting from 29 €.
HTML (Course) HTML (Course)
The markup language for the Web from 29 €.
Javascript (Course) Javascript (Course)
Complete guide to client-side scripting. From 39 €.
Sponsored Links