callback – the function to call when the “submit” event occurs (required).
Returns:
The [[mdn>Web/API/HTMLFormElement|HTMLFormElement]] it was called on, thus allowing for command chaining.
Note:
This is just a shorthand function for the [[toolbox:event:on:index|.on]] method, specific for the “submit” event. See there for more information and examples.
===== See also =====
* [[toolbox:event:on:index|.on]]
* [[toolbox:event:off:index|.off]]
===== More information =====
* [[mdn>Web/API/HTMLFormElement|HTMLFormElement]] on MDN.