Skip to content

Instantly share code, notes, and snippets.

@bczhc
Last active October 31, 2021 03:48
Show Gist options
  • Save bczhc/b15b0be41fb58b96a14376123cdca835 to your computer and use it in GitHub Desktop.
Save bczhc/b15b0be41fb58b96a14376123cdca835 to your computer and use it in GitHub Desktop.
安全教育平台自动完成题目脚本
let task = () => {
$("#buzhou2ss")[0].click();
for (e of $("#test_three")[0].children) {
let name = e.getAttribute("name");
let c = $(`#test${name}`)[0];
for (dd of c.children) {
let checkedBox = dd.getElementsByTagName("input")[0];
if (checkedBox.value === "1") checkedBox.checked = true;
}
}
$("#input_button")[0].click();
};
$("#buzhou2ss")[0].click();
setTimeout(() => {
while ($("#test_three")[0].children.length == 0);
task();
}, 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment