javascript question
- Started
- Last post
- 12 Responses
- dconstrukt
any idea how to show tomorrows day on an html page with javascript?
theres a bunch of date scripts out there just not sure how to modify them.
so like if today is wed. I want the thing to show (say +2 days) friday.
anyone?
- Krassy0
var tomorrow = new Date();
tomorrow.setTime(tomorrow.getTim... ) + (1000*3600*24));
document.write(tomorrow);
- acescence0
var today = new Date();
today.setDate(today.getDate()+1...
- Krassy0
var tomorrow=new Date();
tomorrow.setTime(tomorrow.getTim...
document.write(tomorrow);
- dconstrukt0
thanks krassy... is that the whole thing? I dont k now shit about js. lol
- dconstrukt0
thanks dude.... i might not have been clear. I want to show the day of the week in the html text but I want it to show tomorrows day of the week. (so like whatever day +1)
- acescence0
yeah, the above is adding one day to the current day. this will print the day of the week:
- acescence0
keep in mind though that javascript will always give the time as it is on the user's system, as that is all it knows. if they're clock is wrong, it will be wrong. if you want foolproof actual time, you need to get it from your server.
- acescence0
here's the whole thing on a page:
- dconstrukt0
THanks dude... appreciate the help.... but you're not getting what I'm saying. lol
i dont want any pop up.... i want to display the day of the week in a headline in html.
so like the headline says....
do this and by (tomorrows day of the week) you'll get results.
hope that makes sense.
not in a popup like you've got it.
- fusionpixel0
theres is no popup on ecescense's response.... have you tested the script?
I think the problem here is that you don't understand JS as you mentioned earlier, which makes it difficult for some one to help you.
- dconstrukt0
yeah when you don't paste the div code in the html it makes it a popup alert box.
my bad.
its not difficult.... its called 'copy-n-paste' dude. :-)