DOM (Document Object Model) events allow event-driven programming languages like JavaScript, JScript, ECMAScript, VBScript and Java to register various event handlers/listeners on the element nodes inside a DOM tree, e.g. HTML, XHTML, XUL and SVG documents. Historically, like DOM, the event models used by various web browsers had some significant differences. This caused compatibility problems. To combat this, the event model was standardized by the W3C in DOM Level 2.
There are many more HTML DOM events that are not use commonly by designers but if you want to know about them then you can view HTML DOM EVENTS
Table of Contents
Common/W3C Events:
There is a huge collection of events that can be generated by most element nodes:
- Mouse events
- Keyboard events
- HTML frame/object events
- HTML form events
- User interface events
- Mutation events
- Progress events
Attribute | Description |
---|---|
onclick | Script runs when a mouse click |
ondblclick | Script runs when a mouse double-click |
onmousedown | Script runs when mouse button is pressed |
onmouseup | Script runs when mouse button is released |
onmouseover | Script runs when mouse pointer moves over an element |
onmousemove | Script runs when mouse pointer moves |
onmouseout | Script runs when mouse pointer moves out of an element |
onkeypress | Script runs when key is pressed and released |
onkeydown | Script runs when key is pressed |
onkeyup | Script runs when key is released |
Last Words:
This is what we have and shared in easy steps for newbies so that they can easily know how it works. Stay with us because we are going to share a whole guide step by step about Coding and make it easy for you. If you liked it then share it and be with us to get next tutorial. If you have any problem then feel free to ask us. We will help you with what we can or have.
Be the first to write a comment.