I have a HTML form with button:
That's because you shouldn't just use the submit
function, but trigger
the submit like:
$("#MyForm").trigger('submit');
Browsers don't fire the form's onsubmit
handler when you manually call form.submit()
.
jQuery also mimicks used to mimick that (see this "wontfix" "bug" report).
See also: