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 :: react replace all line breaks with br 
Javascript :: Glide Ajax Client Script ServiceNow 
Javascript :: ngmodel angular 
Javascript :: javascript string contains substring 
Javascript :: string includes substring javascript 
Javascript :: zoho smtp mail nodejs 
Javascript :: how to hide component in react 
Javascript :: pxijs text 
Javascript :: js merge 2 lists 
Javascript :: check if document is ready js 
Javascript :: text inside an image component react native 
Javascript :: when a form is subbmited jquery 
Javascript :: javascript htmlentities 
Javascript :: js remove element from array 
Javascript :: TypeError: sequelize.import is not a function 
Javascript :: javascript string starts with 
Javascript :: shuffle array javascript 
Javascript :: change alt text javascript 
Javascript :: get element by click 
Javascript :: how to store an entire object in cookies javascript 
Javascript :: js math.random 
Javascript :: can you call api in next.js getserverside props 
Javascript :: value change event jquery 
Javascript :: return response json two variables laravel 
Javascript :: how to numbers by checked in checkbox in javascript 
Javascript :: is node js faster than python 
Javascript :: express request body undefined 
Javascript :: route pass props to component 
Javascript :: 150 pound in kg 
Javascript :: font awesome react native icons 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =