jQuery submit: Main Tips
- The jQuery submit form method adds an event handler, executing a function when a
submit
event occurs. It can also trigger that event. - The
submit
event is applied to form elements.
Handling submit Events
The jQuery .submit()
method attaches an event handler that runs a function when a submit
event occurs. It can also invoke the event, occuring whenever a jQuery form submittion happens.
To trigger the jQuery submit
event, the syntax is as follows:
$("selector").submit();
Attach an event handler by adding a function
to be executed when a jQuery form submittion occurs:
$("selector").submit(function);