Skip to content

Instantly share code, notes, and snippets.

@keefertaylor
Last active November 12, 2020 15:56
Show Gist options
  • Save keefertaylor/0ad82dcb3edc726e1489c2d1e82f5ba6 to your computer and use it in GitHub Desktop.
Save keefertaylor/0ad82dcb3edc726e1489c2d1e82f5ba6 to your computer and use it in GitHub Desktop.
const value = 25
const numBoxes = 40
for (var i = 0; i < numBoxes; i++) {
console.log("Getting box " + i)
const checkbox = document.getElementsByName('secCheckbox' + i)[0]
checkbox.checked = true
const investmentsInput = document.getElementsByName('noofreinvest' + i)[0]
investmentsInput.value = value
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment