// Watch for the user leaving the web site
window.onunload = function(){
// Display a message to the user, thanking them for visiting
alert( “Thanks for visiting!” );
};
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.