方正系统需要每次评价,每次点击很多,我做了一自动评价
我们评价是随机
首先打开浏览器
F12
Console
复制下面代码
var iframe = document.getElementById('iframeautoheight');
var pjkc = iframe.contentWindow.document.getElementById('pjkc');
var courseCount = pjkc.length;
var courseNames = [];
for (var i = 0; i < pjkc.childNodes.length; i++) {
var option = pjkc.childNodes[i];
if (option.nodeName == '#text') {
continue;
}
courseNames.push(option.innerText);
}
evaluate(iframe);
var cc = 0;
console.log('已评价: ' + courseNames[cc]);
iframe.onload = function () {
if (cc < courseCount - 1) {
evaluate(iframe);
cc++;
console.log('已评价: ' + courseNames[cc]);
} else {
console.log('所有' + courseCount + '门课程已评价完成');
}
};
function evaluate(iframe) {
var selec = iframe.contentDocument.getElementsByTagName('select');
var length = selec.length;
for(var i=1;i<length;i++){
var ran=parseInt(Math.random() * 5,10)+1;
selec[i].selectedIndex=ran;
}
iframe.contentDocument.getElementById('Button1').click();
}
复制进去,回车
然后提交