The following is a simple event example:
Move your mouse on me!
Here's the code:
<p> Move your mouse <span style="border:solid thin" onmouseover="alert('You moused over me!');">on me</span>! </p>
This is a simple example of a Event. The event is “onMouseOver”, attached to the “span” container. When user moves the mouse over the word, the browser detects it and fires the event, then calls the JavaScript function (the event handler) attached with that event.
Related essays: