Song.Site/Templates/Web/_Public/Scripts/examing.js

(开头部分) 35KB

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

//窗体滚动时,需要固定的内容
$(document).ready(function () {
    var cardbox = $(".pagerCard");
    if (cardbox.size() > 0) {
        var off = cardbox.offset();
        window.cardbox_top = off.top; //
    }
    //重构提示框
	window.alert=function(msg,title,width,height,closeEvent){
        $('body').css('overflow','hidden');
        if(title==null || title=="")title="警告";
        if(width==null)width=400;
        if(height==null)height=300;
		var box=new MsgBox(title,msg,width,height,"alert",null,closeEvent);
        box.OverEvent =function(){
            if(closeEvent!=null)closeEvent();
            //window.MsgBox.Close();
            $('body').css('overflow','auto');
        }
		box.Open();
	};
    window.confirm=function(title,msg,width,height,enterEvent,closeEvent) {
        $('body').css('overflow','hidden');
        var msg = new MsgBox(title, msg, width, height, "confirm");
        if(enterEvent!=null)msg.EnterEvent =enterEvent;
        msg.OverEvent =function(){
            if(closeEvent!=null)closeEvent();
            //window.MsgBox.Close();
            $('body').css('overflow','auto');
        }
        msg.Open();
    };
    $(window).scroll();
});
$(window).scroll(function () {
    var cardbox = $(".pagerCard");
    if (cardbox.size() > 0) {
        var offsetTop = $(window).scrollTop(); //滚上去的高度值
        if (offsetTop > window.cardbox_top) {
            cardbox.css("margin-top", (offsetTop - window.cardbox_top + 15) + "px");
        } else {
            cardbox.css("margin-top", 10 + "px");
        }
    }
});

/*
考试现场的处理对象
*/
function Examing() {
    //相关属性
    this.attr = {
        theme: null,     //考试主题
        uid: null,        //全局唯一值
        testpager: 0,     //试卷id
        stid: 0,          //学员id
        isToggleWindows: false, //是否允许切换窗口(窗口失去焦点,是否自动提交)
        isDisabledFresh: false, //是否禁止刷新页面,为true时禁止
        isRightClick: true, 	//是否禁止复制,为true时禁止
        isShowBtn: false          //是否显示答案的确认按钮
后面还有 777 行代码,解锁后查看完整代码

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

AI 解读

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

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