The closed property

The closed property is used to check whether or not a window has been closed by the viewer. It is normally used with the name of a window followed by the closed property.

if (windowname.closed) {
	JavaScript code here

Of course, windowname will be replaced by the name of the window you wish to check.

Leave a Reply