More setInterval function


var
firstInterval; var secondInterval; function firstAlert () { IF (firstInterval) the clearInterval (firstInterval); // this is the focus // handles all ......... firstInterval = the setInterval ( 'firstAlert ()', 1000 * 2 ); } function secondAlert () { IF (secondInterval) the clearInterval (secondInterval); // this is the focus // handles all ....... secondInterval = the setInterval ( 'secondAlert ()', 1000 *. 3);

 

 

Guess you like

Origin www.cnblogs.com/lakeliu/p/11948988.html