This example uses getElementById() which is incompatible with older Netscape browsers like Netscape 4.7.

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().