大学生必备技巧!正方系统自动测评

导语:作为大学生,应该知道,每到学期末,该死的学校就会让你对每个老师在本学期的教学成果进行点评,老师又多吼,每个老师又得评价十几二十个项,评完都得花一个小时啦,所以现在我们要让代码去代替我们的工作。接下来直接上干货。

使用步骤:

1.使用时,直接copy下面代码。
2.进入系统评价页面

这里写图片描述

3.按下F12(google浏览器),点击console选项,把代码黏贴进去,回车,啪啪啪就搞定了
这里写图片描述

代码与解析(补充评价版)

var a = document.querySelector('iframe');
var c = document.querySelectorAll("ul.nav>li.top")[3].querySelectorAll("ul.sub>li").length;

status = false;

// callback

function b() {

if (status == "true")

return;

status = true;

if (c == 0) {

a.setAttribute('onload', "javascript:dyniframesize('iframeautoheight');");

a.contentDocument.getElementById("Button2").click();

alert("done");

return;

}

var selects = a.contentDocument.querySelectorAll('table.datelist>tbody>tr>td>select');

for (var i = 0; i < selects.length; i++) {

selects[i].selectedIndex = 1

}

var index = Math.round(Math.random()*(selects.length - 1));
//评价
a.contentDocument.getElementById("pjxx").value='非常好,谢谢老师';
selects[index].selectedIndex = 2;

a.contentDocument.getElementById("Button1").click();

c--;

status = false;

}

a.setAttribute('onload', "javascript:dyniframesize('iframeautoheight');b();");

// start

b();
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值