Skip to content

Instantly share code, notes, and snippets.

@rahulmalhotra
Last active December 12, 2021 04:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmalhotra/9a3a0c9a6e8527344fc09e352d6f7576 to your computer and use it in GitHub Desktop.
Save rahulmalhotra/9a3a0c9a6e8527344fc09e352d6f7576 to your computer and use it in GitHub Desktop.
This gist is used to enable first checkbox named "enable" on current page
let inputs = document.getElementsByTagName('input');
for(let input of inputs) {
if(input.type === 'checkbox' && input.name === 'enable') {
input.disabled = false;
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment