/

HTML / CSS / JavaScript Tutorial

HTML Event attribute: onbeforeunload

[this page | pdf | back links]

The HTML onbeforeunload attribute specifies the event that is triggered just before a document is unloaded. It applies to <body> elements.

 

It can be used to return a message if the user is just about to leave the page.

 


NAVIGATION LINKS
Contents | Prev | Next | HTML Attributes


Desktop view | Switch to Mobile