Javascript Event Handlers

Javascript is an event driven language, when a specified event occurs it triggers a javascript event handler.

Event Handlers
Javascript Event handlers go inside html tags not scripts.

For example, the onmouseover event is one event associated with the html <a> tag.

move the mouse over me !

<a href='javascript:void(0);' onmouseover="alert('You moused over me');">move the mouse over me !</a>

In this example the the Event handler onmouseover is used to invoke a javascript alert box when the mouse is over the link.

It is important to note that not all tags support all handlers.
There is also differences (sigh) between browsers in terms of which tags and handlers are supported