views:

947

answers:

3

Is the window object onclose() or closing() event exposed in HTML/Javascript?

A: 

I think you want the onUnload event.

gkrogers
+1  A: 

You have both onunload() and onbeforeunload() javascript events for that.

romaintaz
A: 

There is no event that lets you determine the difference between a page refresh, form submission, link clicked, or browser closed.

I am guessing that is what you are really after.

epascarello