Detect browser window closing event in Firefox –

I want to execute some java script code when I close the browser. The following code is executing in I.E. But I want to execute in Firefox and Netscape.

<script language=”JavaScript”>

function doUnload(evt)
var e = (window.event) ? window.event : evt;

if (e.clientX < 0 && e.clientY < 0){

alert(“window closing….”);


Leave a Reply

Your email address will not be published. Required fields are marked *