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

how to disable all buttons in javascript

$("input[type=button]").attr("disabled", "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 :: expo textinput caret style 
Javascript :: p5.js script tag 
Javascript :: iso string to timestamp javascript 
Javascript :: javascript best way to create synchronous pause in program 
Javascript :: js get string byte size 
Javascript :: how to get all items in localstorage 
Javascript :: adding a prototype on vue using nuxt 
Javascript :: disable enter on input field react 
Javascript :: javascript add event listener 
Javascript :: javascript close current tab 
Javascript :: node check if not connected to internet 
Javascript :: javascript find link by href 
Javascript :: update the whole target of a proxy javascript 
Javascript :: spreadjs autofit column with minimum 
Javascript :: add a text on last object map reactjs 
Javascript :: jquery if variable contains text 
Javascript :: sin in javascript 
Javascript :: allow empty joi validation 
Javascript :: font awesome shopping cart icon 
Javascript :: canvas change line color 
Javascript :: expo build android app bundle 
Javascript :: generate random brightest color 
Javascript :: remove undefined from array javascript 
Javascript :: node express json request urlencoded 
Javascript :: hasOwnProperty with more than one property javascript 
Javascript :: vue router push 
Javascript :: htmlparser2 extract text from html 
Javascript :: regular expression javascript with domain validation 
Javascript :: get offset of element relative to parent 
Javascript :: regex check is valid ip 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =