diff --git a/app.js b/app.js index 858ff28..2b9b074 100644 --- a/app.js +++ b/app.js @@ -24,10 +24,14 @@ const displayTime = () => { document.querySelector('.btn-primary').addEventListener('click', (event) => { startTime=Date.now(); + document.querySelector('.btn-primary').disabled=true; + document.querySelector('.btn-secondary').disabled=false; windowInterval = window.setInterval(displayTime,1000) }) document.querySelector('.btn-secondary').addEventListener('click', (event) => { + document.querySelector('.btn-primary').disabled=false; + document.querySelector('.btn-secondary').disabled=true; window.clearInterval(windowInterval) }) diff --git a/index.html b/index.html index 3c943bc..44d4da1 100644 --- a/index.html +++ b/index.html @@ -12,7 +12,7 @@
- +