- var Digital=new Date()
- var hours=Digital.getHours()
- if (hours>=5&&hours<=11)
- //GREETING MESSAGE FOR MORNING
- document.write('<h2>Hello! Good Morning! Have a nice day.</h2>')
- else if (hours==12)
- //GREETING MESSAGE FOR NOON
- document.write('<h2>Good Noon Visitor! </h2>')
- else if (hours>=13&&hours<=17)
- //GREETING MESSAGE FOR AFTERNOON
- document.write('<h2>Good Afternoon! </h2>')
- else if (hours>=18&&hours<=20)
- //MESSAGE FOR EVENING (6pm-8pm)
- document.write('<h2>Good Evening! </h2>')
- else if (hours>=21&&hours<=11)
- //GREETING MESSAGE FOR NIGHT (9pm-11pm)
- document.write('<h2>Good Night! </h2>')
- //GREETING MESSAGE FOR LATE NIGHT (12pm-4am)
- document.write('<h2>Wow! You`re still awake. Working Late?</h2>')
Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.
Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.
FOR YOUR OWN SAFETY, PLEASE:
1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.