This example uses the HTML DOM to assign an "onbeforeunload" event to the window object.

Close this window, press F5 or click on the link below to invoke the onbeforeunload event.

Firefox and Chrome handle this differently. Firefox allows you access
the document body but Chrome does not. Only the title can be altered
before the dialog shows in Chrome.

Click here to go to Mediacours