Display "Thank you for visiting our website": via JavaScript

Display "Thank you for visiting our website": via JavaScript

It can be a nice idea to thank visitors for visiting your website or blog. It creates a good atmosphere in which to gain returning visitors. In this short How-To guide, we will show you how to display this message of thanks on your website using JavaScript.

JavaScript 1.La

  • Copy / Paste this code between the <head> </ head> of your html page:

<script language="javascript"> function bye () ( alert ( "Thank you for visiting my site and see you soon!"), / / edit the text according to your wishes. ) </ script> 2.Appel Script

  • To use this feature, simply add the event in the tag onUnload

<body onUnload="bye();">

NB: You must complete these steps on all pages.

Do you need more help with Javascript? Check out our forum!

Web