[thelist] javascript - insert a movable date
Rory.Plaire at wahchang.com
Rory.Plaire at wahchang.com
Tue Nov 20 13:10:37 CST 2001
+| Hi,
+|
+| I am new to javascript and will greatly appreciate
+| help with my task.
+| I need to insert a movable date into a page like so:
Hi irina,
I'm new to JS too, and never played around with the date functions.
I came up with this... let me know if it works out.
RightNow = new Date();
document.write("Today's date is " +
(RightNow.getMonth()+1)+"-" + RightNow.getDate() + "-"
+ RightNow.getFullYear() + ". You entered this Web Page at exactly: " +
RightNow.getHours() + ":" +
RightNow.getMinutes() + " and " +
RightNow.getSeconds() + " seconds");
document.write("<br><br>");
RightNow.setDate(RightNow.getDate()+5);
document.write("5 days from now will be: " + (RightNow.getMonth()+1) + "-" +
RightNow.getDate());
document.write("<br><br>");
<rory disposition="still sleeping" alt="|0"/>
More information about the thelist
mailing list