JavaScript EventsThe change in the state of an object is known as an Event. In html, there are various events which represents that some activity is performed by the user or by the browser. When javascript code is included in HTML, js react over these events and allow the execution. This process of reacting over the events is called Event Handling. Thus, js handles the HTML events via Event Handlers. For example, when a user clicks over the browser, add js code, which will execute the task to be performed on the event. Some of the HTML events and their event handlers are: Mouse events:
Keyboard events:
Form events:
Window/Document events
Let's discuss some examples over events and their handlers. Click EventTest it NowMouseOver EventTest it NowFocus EventTest it NowKeydown EventTest it NowLoad eventTest it NowNext TopicJavaScript addEventListener() |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India