Song.Site/Templates/Web/Gov/Scripts/TestView.js

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

$(function(){
    _ClacInfo();
	_ClacTax();
	_ClacResult();
	_ClacSucess();
	setEvent();
});
//设置按钮事件
function setEvent(){
	//显示所有
	$("#btnAll").append("("+$(".qitemBox").size()+")");
	$("#btnAll").click(function(){
		$(".qitemBox").show();
		_setEventLoyout();
	});
	//只显示错误
	$("#btnError").append("("+$(".qitemBox[ansState=1]").size()+")");
	$("#btnError").click(function(){
		$(".qitemBox").hide();
		$(".qitemBox[ansState=1]").show();
		_setEventLoyout();
	});
	//只显示正确
	$("#btnSuccess").append("("+$(".qitemBox[ansState=0]").size()+")");
	$("#btnSuccess").click(function(){
		$(".qitemBox").hide();
		$(".qitemBox[ansState=0]").show();
		_setEventLoyout();
	});
	//只显示未做的试题
	$("#btnNoans").append("("+$(".qitemBox[ansState=2]").size()+")");
	$("#btnNoans").click(function(){
		$(".qitemBox").hide();
		$(".qitemBox[ansState=2]").show();
		_setEventLoyout();
	});
}
function _setEventLoyout() {
	$(".typeBox").each(function(){
		$(this).show();
		if($(this).find(".qitemBox:visible").size()<1) {
			$(this).hide();
		}else{
			$(this).show();
		}
	});
}
//计算得分
function _ClacInfo(){
    $("tr.sum td").each(function (index) {
        if (index < 1) return;
        var sum = 0;
        $("tr.itemrow").each(function () {
            var td = $(this).find("td").get(index);
            var num = Number(td.innerText);
            sum += num;
        });
        $(this).html(sum);
    });
}
后面还有 63 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读 AI

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。