Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

submit form jquery browser check

var $myForm = $('#myForm');

if(! $myForm[0].checkValidity()) {
  // If the form is invalid, submit it. The form won't actually submit;
  // this will just cause the browser to display the native HTML5 error messages.
  $myForm.find(':submit').click();
}
 
PREVIOUS NEXT
Tagged: #submit #form #jquery #browser #check
ADD COMMENT
Topic
Name
7+7 =