Submitted by azalea zenith on Tuesday, October 11, 2016 - 15:02.
This simple script that I create using JavaScript jQuery that will message the user then this program will greet the user base on the current time. Use this simple program to be polite to the user and it shows to the user how much they important in every visit to the website.
Live Demo
All source code construct using jQuery script. Let's construct one by one.
This simple script greeting to the user for the Morning. This would be like the script.
if (hours >= 5 && hours
Hello! Good Morning! Have a nice day.
')
This one, for the noon greetings to the user.
if (hours == 12)
//GREETING MESSAGE FOR NOON
document.write('
Good Noon Visitor!
')
And, for the afternoon greetings to the user.
if (hours >= 13 && hours
Good Afternoon!
')
This time for the evening greetings to the user.
if (hours >= 18 && hours
Good Evening!
')
After that, this greeting would be a good night for the user.
if (hours >= 21 && hours
Good Night!
')
Lastly, this greeting is for the user who sleeps in the late night.
else
//GREETING MESSAGE FOR LATE NIGHT (12pm-4am)
document.write('