Var DiaryDays = "<2004-08-05> <2004-08-09> <2004-08-12> <2004-08-19> <2004-08-19> <2004-07-14> <2004-07 -13> <2004-07-08> <2004-07-05> <2004-07-04> <2004-07-03> <2004-06-27> <2004-06-26> <2004-06- 25> "
script>
.calendarbigborder {font-family: "arial", "Helvetica", "Sans-Serif", "Song"; Text-Decoration: none; width: 170; Background-Color: #ffff; font-size: 9pt; border: 1px dotted # 999;}
.calendartd {font-family: "arial", "helvetica", "sans-serif", "Song"; font-size: 9pt; color: # 000000; Background-color: #eeeeee; height: 18px; width: 11 %; Text-align: center;
.calendarminput {font-family: "Arial", "Helvetica", "Sans-Serif", "Song"; Font-Size: 9pt; Text-Decoration: None; Background-Color: #ffffff; Height: 15px; border: 1PX Solid # 666666; width: 19px; color: # 0099ff;}
.calendaryInput {font-family: "arial", "helvetica", "sans-serif", "Song"; font-size: 9pt; color: # 0099ff; future-decoration: none; background-color: #ffffff; Height : 15px; width: 34px; border: 1px solid # 666666;
.calendarmonthtitle {font-family: "arial", "Helvetica", "Sans-Serif", "Song"; font-size: 9pt; font-weight: Normal; TEXT-ALIGN: CENTER; color: # 333333; Text-Decoration: none; background-color: #eeeeeee; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-bottom -style: none; border-top-color: # 999999; border-bottom-color: # 999999; border-left-color: # 999999;}. Calendarnow {font-family: " Arial "," Helvetica "," Sans-Serif "," Song "; Font-Size: 9pt; Font-Weight: bold; color: # 000000; Background-Color: # c0c9d3; height: 18px; text-align: center }
.calendardaysat {font-family: "arial", "helvetica", "Sans-Serif", "Song"; font-size: 9pt; color: # 333333; text-decoration: none; background-color: #eeeee; text -Align: center; height: 18px; width: 12%;
.calendardaysun {font-family: "arial", "Helvetica", "Sans-Serif", "Song"; font-size: 9pt; color: # 333333; text-decoration: none; background-color: #eeeee; text -Align: center; height: 18px; width: 12%;
.calendarlink {font-family: "arial", "Helvetica", "Sans-Serif", "Song"; font-size: 9pt; font-weight: Normal; color: # 333333; text-decoration: none; background Color: # e7e7f6; text-align: center; height: 18px;
.categorytxt {font-family: "arial", "Helvetica", "Sans-Serif", "Song"; Font-size: 9pt; line-height: 23px; color: # 333333; text-decoration: none;}
.categoryTable {Border-Right-Width: 1PX; Border-Bottom-Width: 1PX; Border-Right-Style: Solid; Border-Bottom-Style: Solid; Border-Left-style: none; border-right-color: # 000000; border-bottom-color: # 000000; border-top-width: 1px; border-top-style: Solid; border-top-color: # 71b99c;} stop>
Var months = new array ("1", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleventh" , "Twelve");
Var Daysinmonth = New Array (31, 28, 31, 30, 31, 30, 31, 30, 31, 30, 31);
Var days = new array ("Japan", "One", "Second", "Three", "Four", "Five", "Six");
VAR ClassTemp;
Var calendahover = "calendahover";
VAR Today = New getToday ();
Var year = Today.Year;
Var month = Today.month;
VAR newcal;
// Get a certain number of days
Function GetDays (Month, Year)
{IF (1 == Month)
Return ((0 == Year% 4) && (0! = (Year% 100))) || (0 == Year% 400)? 29: 28;
Else
Return Daysinmonth [Month];
}
// Get the day time information
Function GetToday ()
{This.now = new date ();
THIS.YEAR = this.now.GetfullyEar ();
THIS.MONTH = this.now.getMonth ();
this.day = this.now.getdate ();
}
/ / Generate calendar
Function Calendar ()
{Newcal = new date (year, month, 1); // The first day of the current month
Today = new gettoday ();
Var day = -1; // Used to determine if the calendar is the same day
Var startday = newcal.getday (); // start time
Var endday = getDays (newcal.getmonth (), newcal.getfullyear ()); // End time
Var daily = 0; // Used to generate the number of days in the calendar
IF ((today.year == newcal.getfullyear ()) && (today.month == newcal.getmonth ()))))))
Day = Today.day;
Var caltable = document.all.caltable.tbodies.calendar; // Get a collection of calendar table VAR INTDAYSINMONTH = GetDays (newcal.getmonth (), newcal.getfullyear ()); // Get the number of days
/ / Generate calendar
For (var intwek = 0; intWeek For (Var INTDAY = 0; INTDAY { Var cell = Caltable.Rows [INTWEEK] .Cells [INTDAY]; // Get unit 袼 / / Generate strings to judge whether there is a log on the day VAR montemp = (newcal.getmonth () 1) <10? ("0" (newcal.getmonth () 1)) :( Newcal.getMonth () 1); IF ((intDay == startday) && (0 == daily)) {daily = 1;} Var daytemp = daily <10? ("0" daily): (Daily); VAR D = "<" newcal.getfullyear () "-" Montemp "-" DayTemp ">" // Select style IF (day == daily) Cell.classname = "calendarnow"; Else IF (DiaryDays.indexof (D)! = - 1) Cell.className = "Calendarlink"; Else IF (intday == 6) Cell.classname = "CalendardAysat"; Else IF (intday == 0) Cell.classname = "calendardaysun"; Else Cell.classname = "calendartd"; // Generate value IF (DAILY> 0) && (Daily <= INTDAYSINMONTH)) {Cell.innertext = Daily; DAILY ; } Else Cell.innertext = "" } Document.all.Year.Value = year; Document.all.month.value = month 1; } Function Submonth () { IF ((MONTH-1) <0) { Month = 11; Year = year-1; } Else { Month = MONTH-1; } Calendar (); } Function addMonth () { IF ((Month 1)> 11) { Month = 0; Year = year 1; } Else { Month = month 1; } Calendar (); } // Get a response event Function getDiary () { VAR MON = (newcal.getmonth () 1) <10? ("0" 1)) :( Newcal.getMonth () 1); var day = event.srcelement.innertext < 10? ("0" event.srcelement.innertext) :( Event.Srcelement.innertext); VAR D = "<" Newcal.Getfullyear () "-" MON "-" Day "> IF ("TD" == Event.srcelement.tagname) IF (""! = event.srcelement.innerText) && (DiaryDays.indexof (D)! = - 1)) { Diary.location = "/ foxmail / archive /" newcal.getfullyear () "/" "/" day ". ASPX"; Window.location.href = diary.location; } } Function setdate () { IF (Document.all.Month.Value <1 || Document.all.mont.Value> 12) { Alert ("The valid range of the month is between 1-12!"); Return; } Year = math.ceil (Document.all.Year.Value); Month = Math.ceil (Document.all.month.Value-1); Calendar (); } Script>
year Month [ next month ] [ last month ] td> tr> Document.write (" For (var Intloop = 1; intloop INTLOOP ) Document.write (" Document.write (" Script> TR> THEAD> For (var intweks = 0; intWeeks <6; intWeeks ) { Document.write (" Document.write (" Document.write (" TR>"); } Script> tbody> TABLE> Calendar (); script>
" Days [0] " TD>");
");
" Days [INTLOOP] " TD>");
"); for (var intends = 0; intDays td>");