setTimeout method in javascript
This method is used to call a specified function on specified time period. If you want to call a function after window load or after click a function or after any action, you can use setTimeout method.
Syntax
time
1000 milliseconds = 1 seconds
10000 milliseconds=10 seconds
60000 milliseconds=1 minutes
Example Program:- (Editor)

Editor is Loading...
Advertisement
Syntax
function expression
or function statement
setTimeout(function(){},time);
setTimeout(callbackfunction,time);
time
1000 milliseconds = 1 seconds
10000 milliseconds=10 seconds
60000 milliseconds=1 minutes
Example
setTimeout(function(){alert("called");},1000);
Example Program:- (Editor)
Editor is Loading...
Advertisement
Post a Comment for "setTimeout method in javascript"