-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetCourse.js
More file actions
20 lines (16 loc) · 1010 Bytes
/
Copy pathGetCourse.js
File metadata and controls
20 lines (16 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
var courseNum=window.frames["mainFrame"].document.body.getElementsByTagName("td")[0].getElementsByTagName("input")["xkh"].value;
var i=0;
for (var e=window.frames["mainFrame"].document.body.getElementsByTagName("table").length;i!=e;++i)
if (window.frames["mainFrame"].document.body.getElementsByTagName("table")[i].bgColor=="#9FD6FF") break;
//alert(i);
var timer=null;
function doStuff(indx){
// alert("infunc");
window.frames["mainFrame"].document.body.getElementsByTagName("td")[0].getElementsByTagName("input")["xkh"].value=courseNum;
iimPlay("inquireCourse.iim");
try{ if (window.frames["mainFrame"].document.body.getElementsByTagName("table")[i].getElementsByTagName("tr")[3].getElementsByTagName("td")[4].getElementsByTagName("span")[0].innerHTML==0){
window.clearInterval(timer);
window.frames["leftFrame"].document.body.getElementsByTagName("input")["xkOper"].click();
}}catch (err){window.clearInterval(timer); alert("Failed");}
}
timer=window.setInterval(function(){doStuff(i);},323);