JavaScript Tutorial/Document/onunload
document.onunload
Syntax
onUnLoad="command"
onUnload event for body tag
<HTML>
<HEAD><TITLE></TITLE></HEAD>
<BODY onUnload="alert("Goodbye");">
</BODY>
</HTML>
Syntax
onUnLoad="command"
<HTML>
<HEAD><TITLE></TITLE></HEAD>
<BODY onUnload="alert("Goodbye");">
</BODY>
</HTML>