Heim  >  Fragen und Antworten  >  Hauptteil

clearTimeout 的意义在哪里?

延迟后运行完就结束了吧,不会像Interval循环执行

这个的作用难道是用在倒计时过程中来取消的?

学习ing学习ing2862 Tage vor1126

Antworte allen(1)Ich werde antworten

  • 阿神

    阿神2016-12-19 10:15:09

    当setTimeout嵌套在循环中是不是就变成了一个循环计时器了?这时就需要clearTimeout来结束……

    不过既然要做循环的话用setInterval不就好了,我也觉得有点多余……

    Antwort
    0
  • StornierenAntwort