$("#btnAddSaveTestSubject").click(function () {
//增加時的驗證,保存
{
return this.optional(element) || value != 0;
(value, element ) {
return this.optional(element) || value != 0;
", function (value, element ) {
return this.optional(element) || value != 0;
idate({
event : "blur",
debug: true,
wrapper: "div",
errorPlacement: function (error, element ) {
},
rules: {
required: true,
admissionBatch: true
"etsadd_educationLevel": {
true
},
🎜> required: true,
professionalProperty: true
}
},
messages: {
"etsadd_admissionBatch": {
required: "請選擇招生批次",
admissionBatch: "請選擇招生批次"
},
"etsadd_educationLevel": {
required: "請選擇學歷類型",
educationLevel: "請選擇學歷類型"
},
"etsadd_professionalProperty": {
professionalProperty: "請選擇專業性質"
submitHandler: function (form) {
if (idArray == null || idArray == "" ) {
jAlert("請選擇測驗科目!", "提示資訊"); for (var i = 0; i jAlert("測試科目" jQuery("#testSubjectGrid").jqGrid("getCell", idArray[ i], "display_content") "的開始時間不能為空!", "提示訊息");
}
if ($("#exam_endtime_" idArray[i]).val () == "") {
jAlert("測試科目" jQuery("#testSubGrid,tap").jq jAlert("測試科目" jQuery("#testSubGrid,tap").jqin", 可能為空的結束時間》 "提示資訊");
return;
var reg_ymd = /^([/d]{4})-([/d]{1,2})-([/d] {1,2})$/; //校驗日期的正規
begindata = $("#exam_begintime_ enddata = $("#exam_endtime_" idArray[i]).val ();
var arr_dt1, arr_dt2;
);
arr_dt2 = enddata.match(reg_ymd);
1] "/" arr_dt1[2] "/" arr_dt1[3]);
enddata = new Date(arr_dt2[1] "/"arr_2[ if (begindata > enddata) {
jAlert("測試科目" jQuery("#testSubjectGrid").jqGrid("getCellCell", 7p[getCell"); 🎜> return;
}
if ($("#exam_turn_" idArray[i]).val() == "") {
jAlert("測試科目" jQuery("#testSubjectGrid") .jqGrid("getCell", idArray[i], "display_content") "的考試場次不能為空!", "提示訊息");
}
exam_turn_" idArray[i]).val() != "") {
var nubmer = $( "#exam_turn_" idArray[i]).val();
jAlert("測試科目" jQuery("#testSubjectGrid").jqGrid("getCell" , idArray[i], "display_content") "的考試場次必須為數字!", "提示訊息");
}
]).val().length > 8) {
"的考試場次不能大於8位元數!", "提示訊息");
}
}
}
$("#AddEntranceTestSubjectFrom").ajaxSubmit({
",
數據類型: 'json',
clearForm: false,
數據: {
strJson: JSON.stringify({
test_course_id: idArray.join("&")
})
},
var json = eval("(" data ")"); if if (json.suc == $("#entranceTestSubjcetMask").hide();
.hide();
entranceTestSubjectGrid ").trigger("reloadGrid");
}
});
}
});
});