|
|
|
@ -145,11 +145,11 @@
|
|
|
|
|
alert("测验标题不能为空");
|
|
|
|
|
} else if($.trim($("#exercise_end_time").val()) =="") {
|
|
|
|
|
alert("截止时间不能为空");
|
|
|
|
|
} else if((Date.parse($("#exercise_end_time").val())+(24*60*60-1)*1000) < Date.now()) {
|
|
|
|
|
} else if((Date.parse($("#exercise_end_time").val())+(24*60*60-1)*1000) <= Date.now()) {
|
|
|
|
|
alert("截止时间不能小于当前时间");
|
|
|
|
|
} else if($.trim($("#exercise_time").val()) !="" && !/^[1-9][0-9]*$/.test($.trim($("#exercise_time").val()))) {
|
|
|
|
|
alert("测验时长必须为非零开头的数字");
|
|
|
|
|
} else if($.trim($("#exercise_publish_time").val()) !="" && Date.parse($("#exercise_publish_time").val()) > Date.now()) {
|
|
|
|
|
} else if($.trim($("#exercise_publish_time").val()) !="" && ((Date.parse($("#exercise_publish_time").val())+(24*60*60-1)*1000) < Date.now())) {
|
|
|
|
|
alert("发布时间不能小于当前时间");
|
|
|
|
|
} else if($.trim($("#exercise_publish_time").val()) !="" && Date.parse($("#exercise_end_time").val()) < Date.parse($("#exercise_publish_time").val())) {
|
|
|
|
|
alert("截止时间不能小于发布时间");
|
|
|
|
|