跳到主要内容

submit

submit() ⇒ self
submit(function(e){ ... }) ⇒ self

Trigger or attach a handler for the submit event. When no function given, trigger the "submit" event on the current form and have it perform its submit action unless preventDefault() was called for the event.

When a function is given, this simply attaches it as a handler for the "submit" event on current elements.