怎么在定时器setTimeout(function()里面1秒重复调用按钮button单击事件?

发布于 7 年前作者 ganghe9861 次浏览最后编辑 7 年前来自 ask

  timer = setTimeout(function() {

  }, 1000);

1 回复
yongyin
yongyin1 楼5 年前
    countdown() {
        let that = this
        timer = setTimeout(function () {
                that.countdown()
        }, 1000);
    },