Answers for "disable a button in javascript for a time period"

0

disable a button in javascript for a time period

const btn = document.getElementById("myBtn")
function myFunction() {
  btn.disabled = true;
  setTimeout(()=>{
    btn.disabled = false;
    console.log('Button Activated')}, 5000)
}
Posted by: Guest on June-25-2021

Code answers related to "disable a button in javascript for a time period"

Code answers related to "Javascript"

Browse Popular Code Answers by Language