Display Date with JavaScript |
| Written by AnaS | |
|
In this tutorial it will be explained how to display the Date in your website using JavaScript. The Date will be shown in the format Sunday, May 20 2007. Put the following code in the head section of your HTML document:
<script language="javascript" type="text/javascript">
First we create the datetime variable that is a Date() type object. Using the methods available we create the d (the day of the month – a number between 0 and 31), day (the day of the week – a number between 0 and 6, first day is Sunday), month (a number between 0 and 11) and year.
<body>
Display date with JavaScript example
written by b , October 06, 2007
These two sentences are as clear as mud: 1) "First we create the datetime variable that is a Date() type object." and 2) "Using the methods available..." What would be most helpful would be to see a completed sample version of what you're trying to describe.
written by Tamil Maran , April 16, 2008
How to get a online date by using a javascript. But not the system Date. Do you need more help? Ask now!
|
|
| Last Updated ( Tuesday, 10 July 2007 ) |