Start one-time timer -setTimeout ()
One-time timer, called once will create and execute a timer once.
format:
setTimeout (call method milliseconds);
Example:
effect:
Stop-time timer clearTimeout ()
setTimeout method to create a timer at the same time, also returns a timer ID, which ID represents the timer.
This timer ID in the current page is not repeated.
We can clearTimeout method, specify a one-time timer is stopped
format:
the clearTimeout (timer ID);
Example:
effect:
Because immediately after the timer setting canceled, so there is no effect.