The score auto filler

先要注入JQuery

var script = document.createElement("script")
script.type = "text/javascript"
script.src = "http://lib.sinaapp.com/js/jquery/1.9.1/jquery-1.9.1.min.js"
script.onload = function() {
console.log("jQuery 已经载入!得再运行一次!")
}
document.body.appendChild(script)

 

Get the inner frame document
var innerFrame = $(window.frames.zhuti.document);

学号:innerFrame.find(“#Form1 #DataGrid1 tr>td:contains(‘学号’)”)
姓名: innerFrame.find(“#Form1 #DataGrid1 tr>td:contains(‘学号’)”).next()
设置成绩:
innerFrame.find(“#Form1 #DataGrid1 tr>td:contains(‘学号’)”).next().next().find(“input”).val(平时成绩);
innerFrame.find(“#Form1 #DataGrid1 tr>td:contains(‘学号’)”).next().next().next().next().find(“input”).val(期末成绩) ;

In The Excel:
innerFrame.find(“”#Form1 #DataGrid1 tr>td:contains(‘学号’)””).next().next().find(“”input””).val(平时成绩);
innerFrame.find(“”#Form1 #DataGrid1 tr>td:contains(‘学号’)””).next().next().next().next().find(“”input””).val(期末成绩) ;

发表评论

电子邮件地址不会被公开。 必填项已用*标注