This example may not work depeding on your browser. You need to have installed the
netscape.javascript
package.
This is the output of the JavaScript events: