till christmas




JavaScript Source Code 3000: Clocks: Till Christmas






























Till Christmas







Let your visitors know how many more days until Christmas. On the day before Christmas, the script indicates that it is Christmas Eve. You may also see how the script reacts to different dates by changing the date on your computer then reloading the script.















JavaScript Source Code 3000: Clocks: Till Christmas
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 Note Pad or Simple Text) and save (Control-s or Apple-s). The script is yours!!!





    





<!-- ONE STEP TO INSTALL TILL CHRISTMAS:

1. Copy the coding into the BODY of your HTML document -->

<!-- STEP ONE: Paste this code into the BODY of your HTML document -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">

<! >
<! >

<!-- Begin
var day_description = "Christmas";
var day_before = "Christmas Eve";

var today = new Date();
var year = today.getYear();
if ((navigator.appName == "Microsoft Internet Explorer") && (year < 2000))
year="19" + year;
if (navigator.appName == "Netscape")
year=1900 + year;
var date = new Date("December 25, " + year);
var diff = date.getTime() - today.getTime();
var days = Math.floor(diff / (1000 * 60 * 60 * 24));

document.write("<center><h3>")

if (days > 1)
document.write("There are " + (days+1) + " days until " + day_description + "!");
else if (days == 1)
document.write("Tommorrow is " + day_before + "!");
else if (days == 0)
document.write("Today is " + day_before + "!");
else if (days == -1)
document.write("It's " + day_description + "!");
else if (days < -1)
document.write(day_description + " was " + ((days+1)*-1) + (days < -2 ? " days" : " day") + " ago this year!");
document.write("</h3></center>");
// End -->
</script>



<!-- Script Size: 1.34 KB -->










Wyszukiwarka

Podobne podstrony:
Christmas elementary
We wish you a Merry Christmas
(eBook ITA) Christie Agatha E troppo facile
christmas money
Eminem Till I Collapse
Christin Lovell [One Soldier One Letter (epub) id 2032600
Christmas Picture Gap Fill Worksheet
b christmas e ltr
Psychologia w skutecznym zarządzaniu Hans Michael Klein, Christian Kolb
Christmas word challenges
christmasborders01
Neslie s Christmas Crunch

więcej podobnych podstron