定义计时器  var timer =  window.setInterval("fs()",1000);/
取消计时器  clearInterval(timer)

备注:注意变量timer的全局性,如果在某个函数中调用setInterval,在另外的函数中调用clearInterval,那么timer 应该声明为全局变量

相关文章:

  • 2022-12-23
  • 2021-04-18
  • 2022-01-29
  • 2021-09-02
  • 2021-12-21
  • 2021-10-13
  • 2021-09-05
  • 2022-12-23
猜你喜欢
  • 2021-11-05
  • 2021-09-11
  • 2022-12-23
  • 2021-05-20
  • 2021-07-14
  • 2022-03-09
  • 2022-12-23
相关资源
相似解决方案