»
EnglishFrenchVietnamese

Print - Alert with onLoad & onUnload events - JavaScriptBank.com

Full version: jsB@nk » Snippet » Alert with onLoad & onUnload events
URL: https://www.javascriptbank.com/alert-with-onload-onunload-event.html

Alert with onLoad & onUnload events © JavaScriptBank.comThis JavaScript uses the onLoad & onUnload events to say hello every time you visit page and say good bye every time you exit.

Full version: jsB@nk » Snippet » Alert with onLoad & onUnload events
URL: https://www.javascriptbank.com/alert-with-onload-onunload-event.html



JavaScript
<script type="text/javascript" language="Javascript">// Alert with onLoad & onUnload event by Thái Cao Phong// Copyright by JavaScriptBank.com// 17-07-2006<!-- Hide code from older browserswindow.onload=sayHello;window.onunload=sayBye;function sayHello(){alert("Hi you, have a good day!");}function sayBye() {alert("Thanks for visiting, and come back soon!");}// Stop hiding code --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->