JavaScript Date/Image
JavaScript Date/Image
- Started
- Last post
- 3 Responses
- TResudek
Been trying to find the script that NT is using to display the date with images...
I am trying to find a script that will display an image based on the day of the week. Any ideas?
TR
- jox0
- Schill0
javascript:alert(new Date().getDay());
That'll give you the day (starting index of 0 for Sunday.. eg. Thursday is 4)
So for something more useful,
var days = ['sun','mon','tues','wed','thu...
var day = new Date().getDay();document.someImage.src = 'image/'+days[day]+'.gif';
Or whatever.
- TResudek0
Got it. Thanks!
TR