阅读背景:

如何使用Javascript禁用和启用按钮

来源:互联网 

So I have been creating a timer in javascript. It counts down from five minutes and changes colors on certain intervals of time. I have created buttons that start the time, stop the time, and reset the time. However, I noticed that when I click the "start" button multiple times it increases the amount of time that is subtracted. So one press = "-1", 2 press = "-2", 3 press = "-3", etc. I am looking to disable the button after clicking it. I have figured out how to disable it but once it is disabled I need to enable it again after clicking the "reset" button. So I have been creating a timer in javascript.




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: