how do I pause and resume a timer?

前端 未结 4 1241
小鲜肉
小鲜肉 2020-12-29 00:58

I got this function that starts a timer on this format 00:00:00 whenever I click on a button. But I don\'t know how to do functions resume and pause. I\'ve found some snippe

4条回答
  •  抹茶落季
    2020-12-29 01:32

    Use window.clearInterval to cancel repeated action which was set up using setInterval().

    clearInterval(delay);
    

提交回复
热议问题