Last active
July 30, 2020 03:06
-
-
Save rspurrell/8f1260e41b7d71a6d60c0ce61d108da5 to your computer and use it in GitHub Desktop.
Check all read-only checkboxes that have their visible checkbox checked
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var inputs = document.getElementsByTagName("input"); | |
for (let i = 0; i < inputs.length; i++) { | |
let e = inputs[i]; | |
if (e.type == "checkbox" && e.checked && e.id.charAt(0) == "d") { | |
document.getElementById("r" + e.id.substr(1)).checked = true; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment