JS中setTimeout与setInterval的区别

timeId=window.setTimeout(“method()”,1000);     window.clearTimeout(timeId);定时执行

timeId=window.setInterval(“method()”,1000);     window.clearInterval(timeId);循环执行


Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

*
请输入图片中的字符以验证你并非垃圾机器人. 点击图片收听验证码的语音版.
点击这里收听此验证码的语音版本