»
EnglishFrenchVietnamese

Print - Greeting Note script - JavaScriptBank.com

Full version: jsB@nk » Time » Greeting Note script
URL: https://www.javascriptbank.com/greeting-note-script.html

Greeting Note script © JavaScriptBank.comWelcome visitors to your site. This JavaScript displays Good Morning, Good Afternoon, or Good Evening, depending on the time of day. Uses page title as part of greeting.

Full version: jsB@nk » Time » Greeting Note script
URL: https://www.javascriptbank.com/greeting-note-script.html



JavaScript
<script type="text/javascript"><!--// Created by: Robin Jones :: http://robinjones.freeuk.com */function greet() {  var todaydate = new Date();  var timeis = todaydate.getTime();  todaydate.setTime(timeis);  var houris = todaydate.getHours();  if (houris > 17) display = "Evening";  else if (houris >12) display = "Afternoon";  else display = "Morning";  var title = document.title;  var welcome = ("Good " + display + ". Welcome to " + title +".");  document.write(welcome);}--></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<script type="text/javascript"><!-- Begin  greet();// End --></script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->