HTML Event Attributes
Window Events
Form Element Events
Keyboard Events
Mouse Events
Window Events
These attributes are valid only in body and frameset elements
Attributes Value Description
onload script Script to be run when a document loads
onunload script Script to be run when a document unloads
Form Element Event
These attributes are valid only in form element
Attributes 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
These attributes are not valid in base,bdo,br,frame,frameset,head,html,iframe,meta,param,script,style, and title elements
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
These attributes are not valid in base,bdo,br,frame,frameset,head,html,iframe,meta,param,script,style, and title elements.
Attribute Value Description
onclick script what to do on a mouse click
ondblclick script what to do on a mouse double-click
onmousedown script what to do when mouse button is pressed
onmousemove script what to do whaen mouse pointer moves
onmouseout script what to do when mouse pointer moves out of an element
onmouseover script what to do when mouse pointer moves over an element
onmouseup script what to do when mouse button is released
Window Events
Form Element Events
Keyboard Events
Mouse Events
Window Events
These attributes are valid only in body and frameset elements
Attributes Value Description
onload script Script to be run when a document loads
onunload script Script to be run when a document unloads
Form Element Event
These attributes are valid only in form element
Attributes 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
These attributes are not valid in base,bdo,br,frame,frameset,head,html,iframe,meta,param,script,style, and title elements
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
These attributes are not valid in base,bdo,br,frame,frameset,head,html,iframe,meta,param,script,style, and title elements.
Attribute Value Description
onclick script what to do on a mouse click
ondblclick script what to do on a mouse double-click
onmousedown script what to do when mouse button is pressed
onmousemove script what to do whaen mouse pointer moves
onmouseout script what to do when mouse pointer moves out of an element
onmouseover script what to do when mouse pointer moves over an element
onmouseup script what to do when mouse button is released
No comments:
Post a Comment