Tips
All Tips ]

A different image for each day of the week

You can add a nice decoration to your site by providing a different image for each day of the week. Here is today's image.

You need only a few lines of JavaScript. Place the following code where you want the image to appear:

<SCRIPT LANGUAGE="JavaScript">
<!--
now=new Date();
day=now.getDay();
document.write("<IMG SRC='image/" + day + ".gif' WIDTH=50 HEIGHT=50 ALT='Image aléatoire'>");
//-->
</SCRIPT>

Use numbering to name your images: 0.gif for Sunday, 1.gif for Monday, and so on till 6.gif for Saturday. Store these images in an image folder on your site.

Discover all Webmaster tips.