Actually I want to keep a live watch, which makes every other update! I have looked around and I have not got any work done. Here I have tried:
function doDate () {var str = ""; Var day = new array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); "Month", "September", "October", "November", "November", "February", "March", "April", "May", "June", "July", "August" ); Var now = new date (); Str + = "Today:" + days [now. Gate (+)] + "," + Now. GateDate (++++++ months [now.getMonth ()] + "+ + now. Gof Full Year (); var updateTime = function () {setTimeout (" doDate () ", 1000);} Document.getElementById (" todaysDate "). InnerHTML = str;}
It does not seem to work! I think I did something here
Please modify your code: -
function DoDate () {var str = ""; Var day = new array ("noise" "Month", "September", "October", "November", "November", "February", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); "Now": "+ day" [now, "March", "April", "May", "June", "July", "August", "December"); Var is now = new date; Gate (+) + "," + Now. Get Date () + + "+ months [now. Gate ()] + "" + Now Fill in (+) + "+" now Guesthors () + ":" + Now Get minutes (+): "+" now Gate seconds (); Document.getElementById ("todaysDate"). InnerHTML = str; } SetInterval (doDate, 1000);
& lt; Div id = "todaysdate" & gt; & Lt; / Div>
Comments
Post a Comment