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 :: Rename files in a directory with node.js 
Javascript :: for element in string js 
Javascript :: sls invoke local 
Javascript :: js camalcase 
Javascript :: js array set value at index 
Javascript :: how to trap js errors window.onerror 
Javascript :: call javascript function use array 
Javascript :: javascript disable button 
Javascript :: lodash remove element from array 
Javascript :: getting days difference with moment js 
Javascript :: convert cookies to json javascript 
Javascript :: regular expression special characters 
Javascript :: javascript calculate 24 hours ago 
Javascript :: Angular ion-search 
Javascript :: get offset from timezone javascript 
Javascript :: createrouter vue history remove Hash 
Javascript :: dynamic style react 
Javascript :: last element in array 
Javascript :: jquery noconflict 
Javascript :: if back react 
Javascript :: javascript regex replace 
Javascript :: react useref 
Javascript :: how to remove first child in javascript 
Javascript :: Internet Speed Checker JavaScript 
Javascript :: json typicode 
Javascript :: bootbox js confirmation 
Javascript :: express how to refresh 
Javascript :: how to get dropdown selected value in javascript onchange 
Javascript :: how to get day name in moment js 
Javascript :: javascript howdo i redirect-to another webpage 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =