1. Home
  2. Computing & Technology
  3. JavaScript

Day of Week

4. Add to Your Page

clr gif
Join the Discussion

Questions? Comments?

The final step in installing this script is to add the following code to the body of your web page where you want the image to appear.

<script type="text/javascript">
dayOfWeekImage();
</script>

If your images are not obviously related to the specific days of the week the way that mine are, you may want to select one of the images to display to visitors whose browsers don't have Javascript enabled - so that your page layout wont be affected. To do this you add the following code immediately after the above code (substituting whichever day of the week corresponds to the image you selected.

<noscript><img src="sunday.gif" width="200" height="80" alt="day of week image - requires Javascript" /></script>
1 | 2 | 3 | 4

Explore JavaScript

More from About.com

  1. Home
  2. Computing & Technology
  3. JavaScript

©2008 About.com, a part of The New York Times Company.

All rights reserved.