The following event attributes could be added to all HTML elements where applicable. The event attributes are used for specifying the characteristics of an element:-

onabort – shoots when element loading is aborted by the user

onblur – shoots when the element loses focus

onchange – shoots when changes to the value of the element occurs

onclick – shoots when the user clicks the element

oncontextmenu – shoots when context menu is requested(right click of element)

ondblclick – shoots when the user double clicks the element

ondrag – shoots when user continues the drag operation

ondragenter – shoots when user mouse enters the element while dragging

ondragleave – shoots when user mouse leaves the element while dragging

ondragover – shoots when user is hovering over the element while dragging

ondragstart – shoots when user initially begins dragging the element

ondrop – shoots when user drops dragged item into the element

onerror – shoots when the element has an error loading

onfocus – shoots when the element gets focus

oninput – shoots when the user changes the value of a form input

onkeydown – shoots when the user presses a keyboard key down

onkeypress – shoots when the user presses a key associated with a character value

onkeyup – shoots when the user releases a downpressed keyboard key

onload – shoots when the element is finished loading

onmousedown – shoots when the user presses down over the element with left mouse button

onmousemove – shoots when the mouse moves while over the element

onmouseout – shoots when the mouse leaves the element

onmouseover – shoots when the mouse goes over the element

onmouseup – shoots when the user releases from a click operation while over the element

onmousewheel – shoots when the user scrolls their mouse wheel while over the element

onpause – shoots when user pauses media playback

onplay – shoots when user agent initiates media playback

onplaying – shoots when playback of media element has started

onprogress – shoots when user agent is retrieving media data

onreset – shoots when the form element is reset

onscroll – shoots when the element view is scrolled

onselect – shoots when the user selects some text in the element

onshow – shoots when user requests the element be shown as a context menu

onsubmit – shoots when the form element is submitted

onsuspend – shoots when access of media data is suspended during buffering of media element

ontimeupdate – shoots when playback position of the media element changes

onwaiting – shoots when the media element playback stops while waiting for more data

Related Article

0 thoughts on “HTML Event Attributes”

Leave a Reply