1. Computing

Day of Week

2. Create the Images

clr gif
Join the Discussion

Questions? Comments?

Below are the seven images that I used with the example of this script. You will probably want to create your own but you can use mine if you want. Whichever way you go you need to make sure that you save the images with the appropriate filenames that appear under the images to match with the days of the week on which they are to display.

All seven images must be the same size, in the same folder path, and of the same file type.

sunday
sunday.gif

monday
monday.gif

tuesday
tuesday.gif

wednesday
wednesday.gif

thurdsday
thursday.gif

friday
friday.gif

saturday
saturday.gif

You need to attach one of the images into the page where you want the images to be displayed. It can either be one of the seven images or a different image as long as it is the same size. It will be what will appear in that spot if JavaScript is not available. For example:

<img id="dow" src="graphics/saturday.gif" width="200" height="80" alt="day of week image" />

The only distinguishing thing about this particular image is that it has a specific id that identifies the image that is to be replaced with the specific day of the week images.

The next step is to obtain the script.

1 | 2 | 3 | 4

©2014 About.com. All rights reserved.