MDN wants to learn about developers like you: https://qsurvey.mozilla.com/s3/MDN-survey

onunload

onunload
Type: script code

Specifies a set of script to execute when the broswer window is closed by the user. This code is used by some programmers to annoyingly pop up alert boxes preventing the users from leaving the page.

Closing the window calls this eventhandler on the prefwindow.

Document Tags and Contributors

Tags: 
 Contributors to this page: SphinxKnight, vipsh18, rolfedh, jan-kiszka
 Last updated by: SphinxKnight,