-
Notifications
You must be signed in to change notification settings - Fork 1
/
script.js
2 lines (2 loc) · 1016 Bytes
/
script.js
1
2
java
script:var flag = true;var id = '';function fillTr(elems, target) {var i;for (i = 0; i < elems.length; ++i) {elems[i].selectedIndex = target;}}function evaluate() {try {var i;var iframe = document.getElementById('iframeautoheight');var iDoc = iframe.contentWindow || iframe.contentDocument;if (iDoc.document) {iDoc = iDoc.document;}var trs = iDoc.getElementById('divJs').getElementsByTagName('tr');var j = 1;var selects = trs[j].getElementsByTagName('select');if (selects.length) {fillTr(selects, 2);} else {++j;selects = trs[j].getElementsByTagName('select');fillTr(selects, 2);}for (i = j + 1; i < trs.length; ++i) {selects = trs[i].getElementsByTagName('select');fillTr(selects, 1);}var submit = iDoc.getElementById('Button1');submit.click();var course = iDoc.getElementById('pjkc');if (course.selectedIndex === course.length - 1) {flag = false;}} catch (e) {}}function checkFlag() {if (!flag) {clearInterval(id);}}function evaluator() {id = setInterval(evaluate, 50);setInterval(checkFlag, 50);}evaluator();