Deutsch
<!-- http://www.downcodes.com/js --> <!-- 完整的HTML文件如下:--> <html> <head> <title>建站学院特效代码->>真正的万年历</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> </head> <body bgcolor="#000000" text="#999999" link="#33FF33 " vlink="#33FF33" alink="#33FF33" onLoad="setToday()"> <SCRIPT LANGUAGE="JavaScript"> <!-- Begin function setToday() { var now = new Date(); var day = now.getDate(); var Monat = now.getMonth(); var year = now.getYear(); wenn (Jahr < 2000) Jahr = Jahr + 1900; this.focusDay = Tag; document.calControl.month.selectedIndex = Monat; document.calControl.year.value = Jahr; displayCalendar(Monat, Jahr); } function isFourDigitYear(year) { if (year.length != 4) { warning ("Leider muss das Jahr vierstellig sein."); document.calControl.year.select(); document.calControl.year.focus(); } else { return true; } } function selectDate() { var year = document.calControl.year.value; if (isFourDigitYear(year)) { var day = 0; var Monat = document.calControl.month.selectedIndex; displayCalendar(Monat, Jahr); } } function setPreviousYear() { var year = document.calControl.year.value; if (isFourDigitYear(year)) { var day = 0; var Monat = document.calControl.month.selectedIndex; Jahr--; document.calControl.year.value = Jahr; displayCalendar(Monat, Jahr); } } function setPreviousMonth() { var year = document.calControl.year.value; if (isFourDigitYear(year)) { var day = 0; var Monat = document.calControl.month.selectedIndex; if (Monat == 0) { Monat = 11; if (Jahr > 1000) { Jahr--; document.calControl.year.value = Jahr; } } else { Monat--; } document.calControl.month.selectedIndex = Monat; displayCalendar(Monat, Jahr); } } function setNextMonth() { var year = document.calControl.year.value; if (isFourDigitYear(year)) { var day = 0; var Monat = document.calControl.month.selectedIndex; if (Monat == 11) { Monat = 0; Jahr++; document.calControl.year.value = Jahr; } else { Monat++; } document.calControl.month.selectedIndex = Monat; displayCalendar(Monat, Jahr); } } function setNextYear() { var year = document.calControl.year.value; if (isFourDigitYear(year)) { var day = 0; var Monat = document.calControl.month.selectedIndex; Jahr++; document.calControl.year.value = Jahr; displayCalendar(Monat, Jahr); } } function displayCalendar(month, year) { monatlich = parseInt(month); Jahr = parseInt(Jahr); var i = 0; var days = getDaysInMonth(month+1,year); var firstOfMonth = neues Datum (Jahr, Monat, 1); var StartingPos = firstOfMonth.getDay(); Tage += StartPos; document.calButtons.calPage.value = „Su Mo Tu We Th Fr Sa“; document.calButtons.calPage.value += "n --------------------"; for (i = 0; i < StartingPos; i++) { if ( i%7 == 0 ) document.calButtons.calPage.value += "n "; document.calButtons.calPage.value += " "; } for (i = StartingPos; i < Tage; i++) { if ( i%7 == 0 ) document.calButtons.calPage.value += "n "; if (i-startingPos+1 < 10) document.calButtons.calPage.value += "0"; document.calButtons.calPage.value += i-startingPos+1; document.calButtons.calPage.value += " "; } for (i=days; i<42; i++) { if ( i%7 == 0 ) document.calButtons.calPage.value += "n "; document.calButtons.calPage.value += " "; } document.calControl.Go.focus(); } function getDaysInMonth(month,year) { var days; if (Monat==1 || Monat==3 || Monat==5 || Monat==7 || Monat==8 || Monat==10 || Monat==12) Tage=31; sonst if (Monat==4 || Monat==6 || Monat==9 || Monat==11) Tage=30; else if (month==2) { if (isLeapYear(year)) { days=29; } else { Tage=28; } } return (Tage); } function isLeapYear (Year) { if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) { return (true); } else { return (false); } } // End --> </SCRIPT> <CENTER> <H2>万年历</H2> <FORM NAME="calControl" onSubmit="return false;"> <TABLE CELLPADDING=0 CELLSPACING=0 BORDER=0> <TR><TD COLSPAN=7> <CENTER> <SELECT NAME="month" onChange="selectDate()"> <OPTION>一月 <OPTION>二月 <OPTION>三月 <OPTION>四月 <OPTION>五月 <OPTION>六月 <OPTION>七月 <OPTION>八月 <OPTION>九月 <OPTION>十月 <OPTION>十一月 <OPTION>十二月 </SELECT> <INPUT NAME="year" TYPE=TEXT SIZE=4 MAXLENGTH=4> <INPUT TYPE="button" NAME="Go" value="创建" onClick="selectDate()"> </CENTER> </TD> </TR> </FORM > <FORM NAME="calButtons"> <TR><TD align="center"><textarea FONT="Courier" NAME="calPage" WRAP=no ROWS=8 COLS=24></textarea></TD> <TR><TD><CENTER> <INPUT TYPE=BUTTON NAME=" previousYear" VALUE="<<" onClick="setPreviousYear()"> <INPUT TYPE=BUTTON NAME=" previousYear" VALUE="< " onClick= "setPreviousMonth()"> <INPUT TYPE=BUTTON NAME=" previousYear" VALUE="Today" onClick="setToday()"> <INPUT TYPE=BUTTON NAME=" previousYear" VALUE="> " onClick="setNextMonth() "> <INPUT TYPE=BUTTON NAME=" previousYear" VALUE = ">>" onClick="setNextYear()"> </CENTER></TD></TR> </form></TABLE></FORM> </center></body> </html>