JavaScript Quarterly Calendar
March 2005 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
April 2005 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
|
|
|
|
|
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
May 2005 |
Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
|
|
|
|
kod:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <META name="GENERATOR" content="Coocool Script Wizard 2002 V2.1.0 for Windows"> <TITLE>Coocool Script Wizard</TITLE>
<SCRIPT LANGUAGE="JavaScript">
<!-- This script and many more are available free online at --> <!-- The JavaScript Source!! Http://javascript.internet.com -->
<!-- Begin var flg = 0; var fs = 1; var bg = "cyan"; M = new Array("January","February", "March","April","May","June", "July","August","September", "October","November","December"); D = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat"); function getBgn() { pdy = new Date(); // today pmo = pdy.getMonth(); // present month pyr = pdy.getYear(); // present year if (pyr < 2000) // Y2K Fix, Isaac Powell pyr = pyr + 1900; // http://onyx.idbsu.edu/~ipowell yr = yr1 = (pmo==0?pyr-1:pyr); // last month's year mo = (pmo==0?11:pmo-1); // last month bgn = new Date(M[mo]+" 1,"+yr1); // assign to date document.write('<TABLE BORDER=0><TR><TD VALIGN=TOP>'); Calendar(); // Send last month to screen document.write('</TD><TD VALIGN=TOP>'); yr = pyr; // present year mo = pmo; // present month bgn = new Date(M[mo]+" 1,"+yr); // assign to date Calendar(); // Send this month to screen document.write('</TD><TD VALIGN=TOP>'); yr = (pmo==11?pyr+1:pyr); // next month's year mo = (pmo==11?0:pmo+1); // next month bgn = new Date(M[mo]+" 1,"+yr); // assign to date Calendar(); // Send next month to screen document.write('</TD></TR></TABLE>'); // Finish up } function Calendar(){ dy = bgn.getDay(); yr = eval(yr); d = "312831303130313130313031"; if (yr / 4 == Math.floor(yr / 4)) { d = d.substring(0, 2) + "29" + d.substring(4, d.length); } pos = (mo * 2); ld = eval(d.substring(pos, pos + 2)); document.write("<TABLE BORDER=1" + " BGCOLOR='" + bg + "'><TR><TD ALIGN=CENTER COLSPAN=7>" + "<FONT SIZE=" + fs + ">" + M[mo] + " " + yr + "</FONT></TD></TR><TR><TR>"); for (var I = 0;I < 7;I ++) { document.write("<TD ALIGN=CENTER>" +"<FONT SIZE=1>" + D[I] + "</FONT></TD>"); } document.write("</TR><TR>"); ctr = 0; for (var I = 0;I < 7; I++){ if (I < dy) { document.write("<TD ALIGN=CENTER>" +"<FONT SIZE=" + fs + "></FONT>" +"</TD>"); } else { ctr++; document.write("<TD ALIGN=CENTER>" + "<FONT SIZE=" + fs + ">" + ctr + "</FONT>" + "</TD>"); } } document.write("</TR><TR>"); while (ctr < ld) { for (var I = 0;I < 7; I++){ ctr++; if (ctr > ld){ document.write("<TD ALIGN=CENTER>" + "</TD>"); } else { document.write("<TD ALIGN=CENTER>" + "<FONT SIZE=" + fs + ">" + ctr + "</FONT>" + "</TD>"); } } document.write("</TR><TR>"); } document.write("</TR></TABLE>"); } // End --> </SCRIPT>
<!-- STEP TWO: Copy this code into the BODY of your HTML document --> </HEAD> <body>
<CENTER> <P><B>JavaScript Quarterly Calendar</B> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin getBgn(); // End --> </SCRIPT> </CENTER> </BODY></HTML>
| |
|
|
|
|
| |
|
|
|
| |
|
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |