课堂测验自动答题脚本

第一种:书签脚本(测验页面点击书签即可运行)
一键答题 ← 拖拽左侧按钮到书签栏
课堂测验页面,点击书签栏中的“一键答题”,即可完成自动作答
第二种:油猴脚本(需要已安装油猴扩展)
// ==UserScript==
// @name         超星网课助手(课堂测验)
// @namespace    wyn665817@163.com
// @version      1.0.0
// @description  课堂测验自动答题,支持单选、多选、判断、填空题,不支持简答题和自动提交
// @author       wyn665817
// @match        *://mobilelearn.chaoxing.com/widget/pcvote/goStudentVotePage*
// @run-at       document-end
// @grant        none
// ==/UserScript==

var $ = window.jQuery;
$('.StudentTimu').each(function(index) { var ans = window.questionlist[index].answer; $(':radio, :checkbox', this).each(function(num) { ans[num].isanswer && this.click(); }); $(':text', this).val(function(num) { return $(ans[num].content).text().trim(); }); });
第三种:控制台脚本(包含注释)
/**
 * wyn665817 | wyn665817@163.com
 * 支持单选、多选、判断、填空题,不支持简答题和自动提交
 */

// 清除已选择的多选题 $(':checked').click();
$('.StudentTimu').each(function(index) {
var ans = questionlist[index].answer;
// 处理单选、多选、判断题 $(':radio, :checkbox', this).each(function(num) { ans[num].isanswer && this.click(); });
// 处理填空题 $(':text', this).val(function(num) { return $(ans[num].content).text().trim(); });
});