JavaScript Source Code 3000: Navigation: Day of Week Redirection
Day of Week Redirection
If you would like to redirect your visitor to a different page for each day of the week, this script would be perfect. It will first detect what day of the week it is and then forward the visitor to the appropriate page. I also might mention that this is a perfect JavaScript example to learn from even if you don't use it. Just look at it!
JavaScript Source Code 3000: Navigation: Day of Week Redirection
Simply click inside the window below, use your cursor to highlight the script, and copy (type Control-c or Apple-c) the script into a new file in your text editor (such as NotePad or SimpleText) and save (Control-s or Apple-s). The script is yours!
<!-- ONE STEP TO INSTALL DAY OF WEEK REDIRECTION:
1. Paste the coding into the HEAD of your HTML document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<! >
<! >
<!-- Begin
function initArray() {
this.length = initArray.arguments.length;
for (var i = 0; i < this.length; i++)
this[i+1] = initArray.arguments[i];
}
var DOWArray = new
initArray("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var today = new Date();
var day = DOWArray[today.getDay()+1];
window.location = day + ".html";
// End -->
</SCRIPT>
<!-- Script Size: 0.79 KB -->
Wyszukiwarka
Podobne podstrony:
day of weekday of month redirectionM A Foster@Ler 03@The Day of the KleshSimak, Cliffard D Day of Trucefunction mcal day of yearFirst Day of ForeverDzień szakala (The Day of the Jackal)function mcal day of yearCarnivale s01e11 The Day of the DeadWilhelm, Kate The Happiest Day of Her LifeDay of Reckoningfunction mcal day of yearChristie Kelley A Week of Pleasure (html)System Of A Down Lonely Dayfunction mcal week of yearwięcej podobnych podstron