I was looking for how to disable button using JS and I find this and it works:
<button id="startbtn" onclick="this.disabled=true; pausebtn.disabled=false; stopbtn.disabled=false;">Start</button>
but I want to disable it using addEventListener() method instead of doing it directly on the html div, but it is not working, is it posible?
let start1 = document.getElementById('startbtn');
start1.addEventListener('click', start);
start1.addEventListener('click', this.disabled = true);
Obs: the second line in the code above starts the "start" function which is a cronometer.