한국어
<!-- 저장 위치 url=http://www.downcodes.com/js --> <!-- 웹 디자인 bbs url=http://www.downcodes.com/bbs--> <!--필수 이를 완료하려면 두 단계가 필요합니다. 첫 번째 단계는 <head> 영역 --> <STYLE TYPE="text/css"> .normal{BACKGROUND: #ffffff} .today {font- 무게:굵게; 배경: #6699cc} .satday{color:green} .sunday{color:red} .days {font-weight:bold} </STYLE> <SCRIPT LANGUAGE="JavaScript"> var Month = new Array( "1월", "2월", "3월", "4월", "5월", "6월", "7월", "8월", "9월", "10월", "11월" ", "12월"); var daysInMonth = new Array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) /*var days = new Array("일요일", "월요일", "화요일" , "수요일", "목요일", "금요일", "토요일");*/ var days = new Array("日","一", "이", "三" , "four", "five", "6"); function getDays(월, 연도) { if (1 == 월) return ((0 == 연도 % 4) && (0 != (연도 % 100)) ) || 400) ? 29 : 28; else return daysInMonth[month]; } function getToday() { //오늘의 연도, 월, 일을 가져옵니다. this.now = new Date() this.now.getFullYear() ; this.month = this.now.getMonth(); this.day = this.now.getDate(); function newCalendar() { today = new getToday(); document.all.year [document.all.year.selectedIndex].text); var newCal = new Date(parseYear, document.all.month.selectedIndex, 1); var day = - 1; ); var daily = 0; if ((today.year == newCal.getFullYear()) &&(today.month == newCal.getMonth())) day = today.day; tBodies.dayList; var intDaysInMonth =getDays(newCal.getMonth(), newCal.getFullYear()); for (var intWeek = 0; intWeek < tableCal.rows.length;intWeek++) for ( var intDay = 0;intDay < tableCal. 행[intWeek].cells.length;intDay++) { var cell = tableCal.rows[intWeek].cells[intDay]; if ((intDay == startDay) && (0 == daily )) daily = 1; ==daily) //오늘의 클래스 호출 cell.className = "today"; else if(intDay==6) //Saturday cell.className = "sunday" else if (intDay==0) //Sunday cell .className ="satday"; else //Normal cell.className="normal"; if ((daily > 0) && (daily <= intDaysInMonth)) { cell.innerText = daily++; "; } } function getDate() { var sDate; //이 코드는 마우스 클릭을 처리합니다. if ("TD" == event.srcElement.tagName) if (" " != event.srcElement.innerText) { sDate = document.all .year.value + "연도" + document.all.month.value + "월" + event.srcElement.innerText + "일" Alert(sDate) } } </SCRIPT> <input type="hidden" 이름 ="ret"> <TABLE ID="calendar" cellpacing="0" cellpadding="0" border=1 align="center"> <THEAD> < TR> <TD COLSPAN=7 ALIGN=CENTER> <SELECT ID= "month" ONCHANGE="newCalendar()"> <SCRIPT LANGUAGE="JavaScript"> for (var intLoop = 0; intLoop < Months.length; intLoop++) document .write("<OPTION VALUE= " + (intLoop + 1) + " " + (today.month == intLoop ? "선택됨" : "") + ">" + 월[intLoop]) </SCRIPT> < /SELECT> <SELECT ID="year" ONCHANGE="newCalendar( )"> <SCRIPT LANGUAGE="JavaScript"> for (var intLoop = today.year-100; intLoop < (today.year + 64); intLoop++) document .write("<OPTION VALUE= " + intLoop + " " + (today.year == intLoop ? "선택됨" : "") + ">" + intLoop) </SCRIPT> </SELECT> </TD> </TR> <TR CLASS="days"> <SCRIPT LANGUAGE ="JavaScript"> document.write("<TD class=satday>" + days[0] + "</TD>"); for (var intLoop = 1; intLoop < days.length-1; intLoop++) 문서. write("<TD>" + days[intLoop] + "</TD>"); document.write("<TD class=sunday>" + days [intLoop] + "</TD>") </SCRIPT > </TR> </THEAD> <TBODY border=1 cellpadding="0" cellpadding="0" ID="dayList"ALIGN=CENTER ONCLICK=" getDate()"> <SCRIPT LANGUAGE="JavaScript"> for ( var intWeeks = 0; intWeeks < 6; intWeeks++) { document.write("<TR style='cursor:hand'>") for (var intDays = 0; intDays < days.length; intDays++) document.write(" <TD></TD>"); document.write("</TR>"); } </SCRIPT> </TBODY> </TABLE> <div align="center"></div> <div 정렬 ="center"> <Script Language="JavaScript1.2"> function Cancel() { document.all.ret.value = ""; window.close( ) </script> </div> <!-- 2단계: <body> 태그에 "OnUnload="window.returnValue = document.all.ret.value;""를 추가합니다. 예: --> <body OnUnload="window.returnValue = document.all.ret. 값;">