Adding the date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've seen some sites which display the date - presumably this is some
Javascript? Anyone tell me what it is please?
Thanks
 
Thanks Mark, but unfortunately the link you posted gives a 404 page not found
error message. I'll have a hunt around Javascript though
 
The link opens fine for me.
--
===
Tom [Pepper] Willett
Microsoft MVP - FrontPage
---
FrontPage Support:
http://www.frontpagemvps.com/
About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
| Thanks Mark, but unfortunately the link you posted gives a 404 page not
found
| error message. I'll have a hunt around Javascript though
|
| "Mark Fitzpatrick" wrote:
|
| > You are correct, this is done through JavaScript. Luckily, there are a
bunch
| > of free scripts that will show the date and/or time. Check out:
| > http://javascript.internet.com/time-date/ for a really good list of
them.
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - FrontPage
| >
message
| > | > > I've seen some sites which display the date - presumably this is some
| > > Javascript? Anyone tell me what it is please?
| > > Thanks
| >
| >
| >
 
firestorm1954 said:
I've seen some sites which display the date - presumably this is some
Javascript? Anyone tell me what it is please?
Thanks

For just a plain date, try this
function getDate()
{
var now = new Date()
document.getElementById("date").innerHTML = now.toLocaleDateString()
}

HTML
<body onload="getDate()">

Current Date: <span id="date"></span>
 
Back
Top