The web is a dynamic environment where a lot of things happen, they're called events.
What are events?
onClick event: triggered by you as you click the link;
onUnload event: triggered by the web browser as it leaves the current web page;
onLoad event: triggered by the browser as the new web page content is loaded.
- onLoad / onUnload;
- onSubmit (triggered by the user submitting a form);
- onFocus / onBlur (triggered by a user as, for example, she clicks in a textbox or clicks away from a textbox respectively);
- onMouseOver / onMouseOut (triggered by the user moving the mouse over or away from an HTML element respectively);
- onKeyDown / onKeyUp(triggered if any key down or up)