View Full Version : Link changing script
01-06-2004, 06:59 PM
Is there a script that will change the link according to the day, as in oin Monday, the button would link to one page, on Tuesday, another, and so on throughout the week - if there is, any help would be very much appreciated!
01-06-2004, 07:45 PM
Something like this:
var links=["sunday.html", "monday.html", "tue.html", "wed.html", "thur.html", "fri.html", "sat.html"];
var now=new Date();
var link = '<a href="'+links[now.getDay()]+'">link</a>';
01-06-2004, 10:43 PM
Thanks, works great.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.