HTML & CSS Snippets
Name:Onunload Message
Description: Display a popup message when the you close the website window.
Code below...
<!--- Save the code below --> <!--- Change "Thank You for visiting my website!" to your actual message --> <!--- Open then close the window to see the message--> <html> <head> <script type="text/javascript"> function mymessage() { alert("Thank You for visiting my website!") } </script> </head> <body onunload="mymessage()"> <p>Hello!</p> </body> </html>