Javascript - Showing a goodbye message to visitors
It is sometimes very pleasant to display a message thanking the visitors of your site to their crossing. This trick is to show you how.
The JavaScript function
Copy / Paste this code between the <head> </ head> of your html page
<script language="javascript">
function bye()
{
// You can edit the alert text ("Thank you for visiting my site and see you soon!");
}
</script>
Using the Script
To use this function, you just have to add the
onUnload event in the tag <body>
<body onUnload="bye();">
Note
- This must be done on all pages of your site.