Home >Web Front-end >JS Tutorial >Js setInterval and setTimeout (timing execution and loop execution) code (parameters can be passed in)_javascript skills
Document's own methods:
Loop execution: var timeid = window.setInterval ("Method name or method", "Delay"); window.clearInterval(timeid);
Timing execution: var tmid = window. setTimeout("Method name or method", "Delay"); window.clearTimeout(tmid);
Example:
A. When no parameters are required in the method to be executed