我在 IE9 中遇到上述错误,但我不明白为什么会这样。我试图找到解决此问题的方法,但处于死胡同。有人可以指出我哪里出错了。起初我以为这可能是最后一个逗号,但事实并非如此。谢谢
jQuery代码
$.validator.setDefaults ({
errorClass: 'form_error',
errorElement: 'div'
});
$("#BA_boxform").validate({
rules: {
BA_customer: {
required: true
},
customerdept: {
required: true
},
customeraddress: {
required: true
},
BA_service: {
required: true
},
BA_box: {
required: true
},
BA_destdate: {
required: true
},
BA_authorised: {
required: true
}
},
messages: {
BA_customer: {
required: '<br />* required: You must select a customer'
},
customerdept: {
required: "<br />* required: You must select a department"
},
customeraddress: {
required: "<br />* required: You must select a customer address"
},
BA_service: {
required: "<br />* required: You must select a service level"
},
BA_box: {
required: "<br />* required: You must enter a box number for intake"
},
BA_destdate: {
required: "<br />* required: You must enter a destruction date"
},
BA_authorised: {
required: "<br />* required"
} **<--- error is reported here**
},
});