HTML Form Event Handler Attributess
HTML Form event handlers are those that triggered by changes inside a form.
For example, the following event handler "onsubmit" will show an alert Form when the form is submitted.
<form onsubmit=" alert('test'); "> <input type=submit value="submit"> </form >
Attribute list inside <form> ... </form>:
Attribute Names | Events |
onblur | When form element lost focus |
onchange | When form element change |
oncontextmenu | Context menu is focused, HTML5 only |
onfocus | When form element get focus |
onformchange | When form change, HTML5 only |
onforminput | When Form get user inputs, HTML5 only |
oninput | When Form element get user inputs, HTML5 only |
oninvalid | When Form element is invalid, HTML5 only |
onselect | When Form element is selected |
onsubmit | When form is submitted |