//倒計時 let timeinterval=""; let countDownStart=""; countDown(timeTotal) { timeinterval = setInterval(() => { timeTotal--; countDownStart = timeTotal + "秒"; if (timeTotal <= 0) { clearInterval(this.timeinterval); countDownStart = "倒計時開始"; } }, 1000); } countDown(60);