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 click coordinates on page 
Javascript :: using map in useeffect 
Javascript :: alert and prompt in javascript 
Javascript :: you should not use switch outside a router react 
Javascript :: ngmodel angular 
Javascript :: javascript string contains 
Javascript :: delete all the rows of table javascript 
Javascript :: nodejs check if string matches regex 
Javascript :: Could not find the drag and drop manager in the context of ResourceEvents. Make sure to wrap the top-level component of your app with DragDropContext 
Javascript :: link on click jquery 
Javascript :: Angular ion-search 
Javascript :: moment format date 
Javascript :: composer require friendsofcake/crud-json-api for cakephp3 version 
Javascript :: create file if not exists nodejs 
Javascript :: ajax form picture upload 
Javascript :: string to jsonobject gson 
Javascript :: flatlist onrefresh react native 
Javascript :: prevent paste in input 
Javascript :: math.factorial 
Javascript :: read json file into object javascript 
Javascript :: compare 2 array element 
Javascript :: js remove the last character from a string 
Javascript :: jquery find by innertext 
Javascript :: iframe reload parent page 
Javascript :: consoleLine 
Javascript :: js reduce break 
Javascript :: assign class to element javascript 
Javascript :: firestore batch add array 
Javascript :: javascript parseint string with comma 
Javascript :: react scrollTop smooth 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =