<Script language = "JavaScript" type = "text/JavaScript"> // After setTimeout, the specified content is executed at a fixed time, unit: millisecond // write 1/* var IID = setTimeout (function () {alert (IID) ;}, 1000 ); * /// method 2 var IID = setTimeout ("clock ()", 2000); // or var IID = setTimeout (clock, 2000); function clock () {alert (IID) ;}cleartimeout (IID); // setinterval is used in the same way as setTimeout. It is executed only once after setTimeout is fixed. The setinterval loop is executed every time. // Each time you call the setTimeout or setinterval function, a unique ID is generated. You can use the cleartimeout or clearinterval functions (the parameters of these two functions correspond to the IDS returned by setTimeout or setinterval) pause the setTimeout or setinterval functions (the return value remains the same for the same setinterval loop) // But test clearinterval (IID) to block setTimeout, cleartimeout (IID) it can also prevent the execution of setinterval. </SCRIPT>