User Tools

<HTMLElement>.onSubmit()

Attaches an event handler callback function to the “submit” event of a <form> element.

Usage:
HTMLFormElement = Form.onSubmit(callback)
Member of:
HTMLFormElement
Parameters:
callback – the function to call when the “submit” event occurs (required).
Returns:
The HTMLFormElement it was called on, thus allowing for command chaining.
Note:
This is just a shorthand function for the .on method, specific for the “submit” event. See there for more information and examples.

See also

More information

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also, you acknowledge that you have read and understand our Privacy Policy. If you do not agree, please leave the website.

More information