5
我使用JQuery驗證腳本來驗證HTML表單。 這在Firefox中完美運行,但在IE8中不起作用。 我認爲冒號(;)或分號(,)有問題......但我無法捕捉它。JQuery驗證在IE8中不起作用
jQuery.validator.addMethod("selectNone", function (value, element) {
if (element.value == "") {
return false;
} else return true;
}, "Please select an option.");
$(document).ready(function() {
$("#formElem").validate({
rules: {
Category: { // "required",simple rule, converted to {required:true}
selectNone: true
},
Repair_technician: { // "required",simple rule, converted to {required:true}
selectNone: true
},
Rework_technician: { // "required",simple rule, converted to {required:true}
selectNone: true
},
Approved_by: { // "required",simple rule, converted to {required:true}
required: true,
},
Part_code: {
required: true,
},
Part_value: {
required: true,
},
JOB_Number: { // "required",simple rule, converted to {required:true}
required: true,
minlength: 9,
maxlength: 9
}
}
});
});
感謝Nick Craver – user437641 2010-09-15 22:22:16
感謝Nick Craver – user437641 2010-09-15 22:22:17