XHTML: Event Attributes

Favorite Article   

Window Events:

Attribute Value Description
onload script Script to be run when a document loads
onunload script Script to be run when a document unloads


Form Element Events:

Attribute Value Description
onchange script Script to be run when the element changes
onsubmit script Script to be run when the form is submitted
onreset script Script to be run when the form is reset
onselect script  Script to be run when the element is selected
onblur script  Script to be run when the element loses focus
onfocus script  Script to be run when the element gets focus


Keyboard Events:

Attribute Value Description
onkeydown script What to do when key is pressed
onkeypress script What to do when key is pressed and released
onkeyup script What to do when key is released


Mouse Events:

Attribute Value Description
onclick script What to do on a mouse click
ondblclick script What to do on a mouse doubleclick
onmousedown script What to do when mouse button is pressed
onmousemove script What to do when mouse pointer moves
onmouseover script What to do when mouse pointer moves over an element
onmouseout script What to do when mouse pointer moves out of an element
onmouseup script What to do when mouse button is released


Referenced from: W3schools.org

 

7381
7/11/2018 2:08:42 PM