Good-bye Message


Example of Script
When you leave this page, a message will pop up saying "Thanks for dropping by !"

Ready to go back to the menu?

Grab the Code
Explanation of Code
You can use the complete <BODY> tag in the example or you can use only the onUnload="alert('Thanks for dropping by !') portion in your own <BODY> tag. This simple JavaScript uses the onUnload event handler to cause an alert box to pop up when the visitor exits the page.
Copyright © 2001 John H. Bolgiano, Jr. - All rights reserved
Modified with permission for educational use by Roberta Bush