Horje
disable submit button until checkbox is checked javascript Code Example
disable submit button until checkbox is checked javascript
// Retrieve reference to checkbox
const disableCheckBox = document.getElementById("disable-checkbox");
// Retrieve reference to button
const submitButton = document.getElementById("submit-button");

disableCheckBox.addEventListener("change", (e) => {
  if (e.target.checked) {
  	// Disable button when checkbox is selected
    submitButton.disabled = true;
  } else {
    // Enable button when checkbox is deselected
    submitButton.disabled = false;
  }
});




Javascript

Related
import jqueery vanilla js Code Example import jqueery vanilla js Code Example
generate random date in a range Code Example generate random date in a range Code Example
yarn react-redux Code Example yarn react-redux Code Example
getcomputed style js Code Example getcomputed style js Code Example
how to push the get variables without page reloading in Jquery Code Example how to push the get variables without page reloading in Jquery Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8