plik


JavaScript Source Code 3000: Page Details: Page Up For Page Up For JavaScript can even display how long your web page has been online. Just enter the date, the script does the calculations, and prints out the time. It has a very nice readout and looks very professional! JavaScript Source Code 3000: Page Details: Page Up For 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!!!      <!-- TWO STEPS TO INSTALL PAGE UP FOR: 1. Copy the coding into the HEAD of your HTML document 2. Add the last code into the BODY of your HTML document --> <!-- STEP ONE: Paste this code into the HEAD of your HTML document --> <HEAD> <SCRIPT LANGUAGE="JavaScript"> <! > <! > <!-- Begin function HowLongSince(startmonth, startdate, startyear) { sdate=startdate; smonth=startmonth-1; syear=startyear; var DaysInMonth = new Array(31,28,31,30,31,30,31,31,30,31,30,31); today = new Date() var thisyear = today.getFullYear(); var thismonth = today.getMonth(); var thisdate = today.getDate(); mstart = new Date(syear,(smonth==12?1:smonth+1),1); days1 = (mstart - new Date(syear,smonth,sdate))/(24*60*60*1000)-1; mend = new Date(thisyear,thismonth,1); days2 = (new Date(thisyear,thismonth,thisdate) - mend)/(24*60*60*1000)+1; dayst = days1 + days2; if (dayst >= DaysInMonth[smonth]) { AddOneMonth = 1; dayst -= DaysInMonth[smonth]; } else AddOneMonth = 0; ydiff1 = thisyear-mstart.getFullYear(); mdiff1 = thismonth-mstart.getMonth()+AddOneMonth; if (mdiff1 >11) { mdiff1=0; ydiff1++; } if (mdiff1 < 0) { mdiff1 = mdiff1 + 12; ydiff1--; } temp = (ydiff1==0?"":(ydiff1==1?ydiff1+" year and ":ydiff1 + " years, ")); temp += (mdiff1==0?"0 months, and ":(mdiff1==1?mdiff1+" month, and ":mdiff1+" months, and ")); temp += (dayst==0?"no days":(dayst==1 ? " 1 day." : dayst + " days." )); return temp; } // End --> </script> </HEAD> <!-- STEP TWO: Copy this code into the BODY of your HTML document --> <BODY> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin document.write("JavaScript Source Code 3000 has been up for "); document.write("<font color=red>"); document.write(HowLongSince(06,15,97)); // this is the date your site was created. day,month,year document.write("</font>"); // End --> </script> <!-- Script Size: 1.96 KB -->

Wyszukiwarka

Podobne podstrony:
setting up for projectc7A2D05
Dolled Up For Murder
2008 03 Safer Box Backing Up for Portables with Box Backup
setting up for a projectDC2887
15 ATL 2006 Up scaling KNX for large projects
Sean Michael Going for the Gold Ramping Up
Friends for a Season warm up
Brandy Corvin Howling for the Vampire
page$
2007 01 Web Building the Aptana Free Developer Environment for Ajax
sysop up
CSharp Introduction to C# Programming for the Microsoft NET Platform (Prerelease)
page&

więcej podobnych podstron