Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

disable a button in javascript

//to enable btn
let temp
   temp = document.getElementById("saveBtnId") as HTMLButtonElement
   if (temp) {
     temp.removeAttribute('disabled');
   }

//disable
if (temp) {
     temp.disabled = true;
   }
 
PREVIOUS NEXT
Tagged: #disable #button #javascript
ADD COMMENT
Topic
Name
3+6 =