JavaScript Date/Image
JavaScript Date/Image
Out of context: Reply #2
- Started
- Last post
- 3 Responses
- 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.