URL Redirect based on the Day Of The Week

Paste this before </head>

<script LANGUAGE="JavaScript">
 <!-- Begin
 var today = new Date();
 var day = today.getDate();
 window.location = day + ".html";
 // End -->
 </script>

Note: it is required that (in this example) you have monday.html, tuesday.html, etc. in the same directory as the page doing the redirection.

Yup, you're right, there are many other ways to do this with server side scripting, this is just an option when server side scripting is not availalbe, or is more than necessary.


javascript day of the month redirect


Back To Top
© 1998 - 2024 psacake.com
Version 7.21 | Advertise on this site