Jquery form submit validation
问题 I have following form: <form id="testForm" action="country_Save"> Country Name:<input type="text" id="countryName" /> <input type="submit" id='saveCountry' value="Add Country" /> </form> and following JQuery for validating textfield $('#testForm') .jqxValidator({ rules : [ { input : '#countryName', message : 'Country Name is required!', action : 'keyup, blur', rule : 'required' }], theme : theme }); How can i use this validation when I am submitting a form? 回答1: Try this please: $('#testForm'