[thelist] age verification JS???
CDitty
mail at redhotsweeps.com
Sun Mar 26 00:32:29 2000
Thanks, but unfortunately, I am so JS unknowledgeable, that I can't even
get this working. :(
CDitty
At 10:42 PM 3/25/00 , you wrote:
> > Does anyone have any age verification javascript that they would like to
> > share? What I am looking for is some JS that will check a month, a day
> > and a year and compare them to today's date. If over certain
> > age, do this.
>
>Try this code:
>
>var now=new Date();
>var end=new Date("december 25, 2000");
>var secsPerDay=24*60*60*1000;
>var left=Math.round((end.getTime()-now.getTime())/secsPerDay+1);
>if (left==0)
> left='Merry Christmas!';
>else if (left < 0)
> left='wait till next year in 2001';
>document.open();
>document.write("<font class='grad' face=verdana,arial size=1><center>Days
>left till Christmas:<br><b>"+left+"</b></center></font>");
>document.close();
>
>hope it works for you, let me know if you have any problems
>
>-ted
>
>
>---------------------------------------
>For unsubscribe and other options, including
>the Tip Harvester and archive of TheList go to:
>http://lists.evolt.org Workers of the Web, evolt !