方法:
var myForm = $("#MainForm"); var formContext = myForm[0]['__MVC_FormValidation']; var errors; if (formContext) { // validate the form errors = formContext.validate("submit"); } if (!formContext || errors.length == 0) { // no errors so submit to server ... }