Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript disable button

//disable the button
document.getElementById(BUTTON_ID).disabled = true;
//reable the button
document.getElementById(BUTTON_ID).removeAttribute('disabled');
Comment

make button disabled javascript

// Makes the button disabled

document.getElementById("myButtonId").setAttribute("disabled", ""); 

// Removes disabled attribute

document.getElementById("myButtonId").removeAttribute("disabled");
Comment

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;
   }
Comment

javascript disable button

document.getElementById(BUTTON_ID).disabled = true;
Comment

button disabled javascript

document.addEventListener("DOMContentLoaded", function(event) {
  document.getElementById("Button").disabled = true;
});
Comment

disable button js

// disable button using prop.

$(".button").click(function(){
  // disable button
  $(this).prop('disabled', true);

  // do something

  // below code enables button clicking after two seconds.
  setTimeout(() => {
    // enable button
  	$(this).prop('disabled', false);
  }, 2000);
});
Comment

button disable in js

document.getElementById("submitButtonId").disabled = true;
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript reflection 
Javascript :: apollo client nextjs 
Javascript :: reactjs get one document from firestore 
Javascript :: angular http async false 
Javascript :: pdf.js extract text 
Javascript :: create or update in sequelize 
Javascript :: JavaScript POSITIVE_INFINITY 
Javascript :: what is new set in javascript 
Javascript :: ordenar un array de mayor a menor 
Javascript :: js array push 
Javascript :: javascript unknown number of parameters 
Javascript :: javascript equality 
Javascript :: alpine js open outside div 
Javascript :: react typescript set type 
Javascript :: ejs to javascript array 
Javascript :: javascript shift 
Javascript :: my angular modal popup is not closing automatically 
Javascript :: how to get json data in postgresql 
Javascript :: ng2 validations angular using reactiveforms 
Javascript :: javascript htmlcollection 
Javascript :: dark mode with react hooks 
Javascript :: date format in javascript 
Javascript :: javascript cookies vs session vs local storage 
Javascript :: axios error network error 
Javascript :: shuffle array in javascript 
Javascript :: binary to decimal javascript 
Javascript :: lodash remove not in array 
Javascript :: currency format 
Javascript :: deep copy javascript 
Javascript :: try catch javascript 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =