Events are basically actions, that when performed will execute some javascript code.
You may already be familiar with some javascript events, for example, swapping images on links when the mouse pointer is placed over the link. These are triggered by events. Here are some of the common events :
Most of the events are normally applied to the the <a> tag. onmouseover and onmouseout when applied to image swapping on links are also called rollovers.
You can apply more than one event to each element as in the following example.
<a href="SOMEURL" onmouseover="DO_SOMETHING" onmouseout="DO_ANOTHER_THING" onclick="DO_SOMETHING ELSE">link text</a>In plain English, the above line translates to
The DO_SOMETHINGS are known as actions, for example when the event onmouseover occurs what action will be carried out. Actions can be as simple as the Hello World! alert example of they could call a javascript function which we will take a look at next.
That about takes care of events and actions so now we can take a look at functions