You are here: irt.org | FAQ | JavaScript | Redirect | Q472 [ previous next ]
Try:
<script language="JavaScript"><!-- function makeArray() { for (i = 0; i<makeArray.arguments.length; i++) this[i] = makeArray.arguments[i]; } var daysArray = new makeArray('sunday','monday','tuesday','wednesday','thursday','friday','saturday'); var today = new Date(); // get todays date var dotw = today.getDay(); // get the day of the week // Sunday = 0, Monday = 1 ... Saturday = 6 location.href = daysArray[dotw] + '.htm'; //--></script>
Also see the answer to Q985