CSS Portal
Run
Search
« Back to
HTML onunload Event Attribute
<!DOCTYPE html> <html> <head> <title>onunload event</title> </head> <body onunload="LeaveUser()"> <script> function LeaveUser() { alert("EXAMPLE: See you again!"); } </script> Leave this page to see the event trigger. <br><br> Note: Due to different browser settings, this event may not always work as expected. </body> </html>
If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!
☕ Buy a Coffee