Difference between js setTimeout and setInterval, js setinterval js settimeout setinterval window. setinterval flash setinterval
Setinterval parameter clearing setinterval asp setinterval as setinterval stop
Let's take a look at the example to explain it.
For example:
Tttt = setTimeout ('northsnow () ', 1000 );
ClearTimeout (tttt );
Or:
Tttt = setInterval ('northsnow () ', 1000 );
ClearInteval (tttt );
Window objects have two main timing Methods: setTimeout and setInteval. Their syntaxes are basically the same, but their functions are different.
The setTimeout method is a Timer Program, that is, after what time. After the job is finished, pull it down.
The setInterval method indicates that an operation is executed repeatedly at a certain interval.
If you use setTimeout to implement the setInerval function, you need to regularly call yourself in the executed program. To clear a counter, you need to call different clearing methods based on the method used: