Welcome to this new post which we will put this code that welcomes your website visitors according to time.
What’s the point of it?
Honestly, I liked the category of these codes because they beautify the site so much, that’s why I designed this model to put it on top of the blog.
Code
Please copy the code correctly and place it in position without modification.
var welcome;
var date = new Date();
var hour = date.getHours();
var minute = date.getMinutes();
var second = date.getSeconds();
if (minute < 10) {
minute = "0" + minute;
}
if (second < 10) {
second = "0" + second;
}
if (hour < 12) {
welcome = "good morning";
18. } else if (hour < 17) {
welcome = "good afternoon";
} else {
welcome = "good evening";
}
document.write("
Categories