Here are two examples that respond to events and modify the document. Rollover
This example was tested in Mozilla 1.7.3 and Netscape 4.79 under Linux,
but it should work with other browsers.

 

Span Done

The idea behind this is that you have here a means to address a part (span) of the HTML page and replace its content using Javascript. Javascript code is triggered by the onLoad event. The statement M.innerHTML='Done' is delayed while you respond to the alert().