JavaScript: Date

Displaying the date within your web page is a good way to spice up your web site and give it a more professional appearance. The following JavaScript code will display the date on your web in the following format:

Place this code where you would like the date to appear:
<SCRIPT language="JavaScript">
<!-- Script courtesy of - Your Guide to Professional Web Site Design and Development
var today_date= new Date()
var month=today_date.getMonth()+1
var today=today_date.getDate()
var year=today_date.getFullYear()
//document.write("Today's date is: ")
//--> </SCRIPT>
You can change the font style and color by enclosing the above JavaScript code with your font tags.
Share this article :


Post a Comment

Copyright © Online Business - All Rights Reserved
Proudly powered by Blogger