Javascript

To interact with these statically defined documents being statically styled, we listen to user events: onmouseover, onmouseout, onclick an element, do this & that..., mainly manipulation of the DOM, the Document Object Model, the XHTML document elements.

Upon an event a function is called, or in general a series of instructions is executed. This is called a script. Javascript is a script language for client-side interaction.

Example of a javascript function saying hello:

Your message?

This site uses scripts to enhance the user experience. If not yet loaded, load them first:

For instance, try the at the top right of the site. Click on the 'A' to reset the text size. Notice how all text resizes except that of the resizer itself.

The one long text document that is this site, can also be navigated as if it were .

Also take a look at the I used to show my designs. In the nostyle/noscript version, this was a list of links to each individual image file: styling transformed it into a roster of squares, and scripts are responsible for the backgrounds and handling.

previous: CSS | next: PHP