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 http://www.web-source.net - 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: ")
document.write(month+"/"+today+"/"+year)
//--> </SCRIPT>
You can change the font style and color by enclosing the above JavaScript code with your font tags.
Share this article :

0 comments:

Post a Comment

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