Easy Tutorial
❮ Html Urlencode Canvas Stroke ❯

HTML onsubmit Event Attribute

HTML Event Attributes

Example

Run a script when the form is submitted:


Browser Support

All major browsers support the onsubmit event attribute.


Definition and Usage

The onsubmit attribute is triggered when the form is submitted.

The onsubmit attribute is only applicable to the <form> element.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
script The script to be run when the onsubmit event is triggered.
❮ Html Urlencode Canvas Stroke ❯