.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Sandeep Singh

Home >> Code Snippets >> Javascript >> Post New Resource Bookmark and Share   

 Subscribe to Code Snippets

Display Greeting message according to time

Posted By:Abhisek Panda       Posted Date: November 06, 2009    Points: 10    Category: Javascript    URL: http://www.dotnetspark.com  

Display Greeting message according to time.

The following javascript will display greeting message like, Good Morning, Good Afternoon and Good Evening according to the time.


       It will display 'Good Morning' if you run it between 12o'clock. After 12o'clock till 5pm it will display 'Good Afternoon' and after 5pm it will display 'Good Evening' on the web browser. You can embed this code in your webpage to greet a user according to time automatically.


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More code samples in C#, ASP.Net, Vb.Net and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend