Basic Date Display | JavaScriptSource

Basic Date Display

Andy Angrick Jan 5, 2005
Use this code snippet to display today's date on your Web page.

The JavaScript Source: Time and Date: Basic Date Display

Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as Note Pad or Simple Text) and save (Control-s or Command-s). The script is yours!!!


Did you use this script?  Do you like this site?  Please link to us!

Leave a Response

1 comment)

is there anyway i can change the appearance of this clock?[br /]i tried using my div tag[br /]"<div id='js'></div>"[br /]inside the javascript like i have when using this code on my website:[br /][br /]var d = new Date();[br /]var time = d.getHours();[br /]if (time < 12)[br /]{[br /]document.write("<div id='js'>Good Morning! It is now</div>");[br /]}[br /]else[br /]{[br /]document.write("<div id='js'>Good Day! It is now</div>");[br /]}[br /][br /][br /][br /]but it doesn't seem to be working :( i wanted to put my click right after the text

katie Apr 8, 2009