|
|
Ŭ¶ó¿ìµåű×
Javascript PHP asp CSS html mysql jquery image Mobile API slide °Ô½ÃÆÇ ¸Þ´º
|
|
|
ÇöÀçÁ¢¼ÓÀÚ ¸í |
|
|
|
|
|
|
|
À¥ Ä«·»´Ù |
|
|
|
|
¼Ò½ººÐ·ù |
½Ã°£,³¯Â¥ |
|
|
´Ù¿î·Îµå Ƚ¼ö |
848 ȸ |
|
|
|
°£´Ü¼³¸í |
»ç¿ëÀÚ°¡ ¿øÇÏ´Â ´ÞÀ» ¼±Åà ÇÒ ¼ö ÀÖ´Â À¥ Ä«·»´Ù ½ºÅ©¸³Æ® |
|
|
|
|
|
<SCRIPT LANGUAGE="JavaScript"><br />
<br />
<!-- Original: Rob Patrick (rpatrick@mit.edu) --><br />
<!-- Begin<br />
function setToday() {<br />
var now = new Date();<br />
var day = now.getDate();<br />
var month = now.getMonth();<br />
var year = now.getYear();<br />
if (year < 2000) // Y2K Fix, Isaac Powell<br />
year = year + 1900; // http://onyx.idbsu.edu/~ipowell<br />
this.focusDay = day;<br />
document.calControl.month.selectedIndex = month;<br />
document.calControl.year.value = year;<br />
displayCalendar(month, year);<br />
}<br />
function isFourDigitYear(year) {<br />
if (year.length != 4) {<br />
alert ("Sorry, the year must be four-digits in length.");<br />
document.calControl.year.select();<br />
document.calControl.year.focus();<br />
} else { return true; }<br />
}<br />
function selectDate() {<br />
var year = document.calControl.year.value;<br />
if (isFourDigitYear(year)) {<br />
var day = 0;<br />
var month = document.calControl.month.selectedIndex;<br />
displayCalendar(month, year);<br />
}<br />
}<br />
<br />
function setPreviousYear() {<br />
var year = document.calControl.year.value;<br />
if (isFourDigitYear(year)) {<br />
var day = 0;<br />
var month = document.calControl.month.selectedIndex;<br />
year--;<br />
document.calControl.year.value = year;<br />
displayCalendar(month, year);<br />
}<br />
}<br />
function setPreviousMonth() {<br />
var year = document.calControl.year.value;<br />
if (isFourDigitYear(year)) {<br />
var day = 0;<br />
var month = document.calControl.month.selectedIndex;<br />
if (month == 0) {<br />
month = 11;<br />
if (year > 1000) {<br />
year--;<br />
document.calControl.year.value = year;<br />
}<br />
} else { month--; }<br />
document.calControl.month.selectedIndex = month;<br />
displayCalendar(month, year);<br />
}<br />
}<br />
function setNextMonth() {<br />
var year = document.calControl.year.value;<br />
if (isFourDigitYear(year)) {<br />
var day = 0;<br />
var month = document.calControl.month.selectedIndex;<br />
if (month == 11) {<br />
month = 0;<br />
year++;<br />
document.calControl.year.value = year;<br />
} else { month++; }<br />
document.calControl.month.selectedIndex = month;<br />
displayCalendar(month, year);<br />
}<br />
}<br />
function setNextYear() {<br />
var year = document.calControl.year.value;<br />
if (isFourDigitYear(year)) {<br />
var day = 0;<br />
var month = document.calControl.month.selectedIndex;<br />
year++;<br />
document.calControl.year.value = year;<br />
displayCalendar(month, year);<br />
}<br />
}<br />
function displayCalendar(month, year) { <br />
month = parseInt(month);<br />
year = parseInt(year);<br />
var i = 0;<br />
var days = getDaysInMonth(month+1,year);<br />
var firstOfMonth = new Date (year, month, 1);<br />
var startingPos = firstOfMonth.getDay();<br />
days += startingPos;<br />
document.calButtons.calPage.value = " Su Mo Tu We Th Fr Sa";<br />
document.calButtons.calPage.value += "<br />
--------------------";<br />
for (i = 0; i < startingPos; i++) {<br />
if ( i%7 == 0 ) document.calButtons.calPage.value += "<br />
";<br />
document.calButtons.calPage.value += " ";<br />
}<br />
for (i = startingPos; i < days; i++) {<br />
if ( i%7 == 0 ) document.calButtons.calPage.value += "<br />
";<br />
if (i-startingPos+1 < 10)<br />
document.calButtons.calPage.value += "0";<br />
document.calButtons.calPage.value += i-startingPos+1;<br />
document.calButtons.calPage.value += " ";<br />
}<br />
for (i=days; i<42; i++) {<br />
if ( i%7 == 0 ) document.calButtons.calPage.value += "<br />
";<br />
document.calButtons.calPage.value += " ";<br />
}<br />
document.calControl.Go.focus();<br />
}<br />
function getDaysInMonth(month,year) {<br />
var days;<br />
if (month==1 || month==3 || month==5 || month==7 || month==8 || month==10 || month==12) days=31;<br />
else if (month==4 || month==6 || month==9 || month==11) days=30;<br />
else if (month==2) {<br />
if (isLeapYear(year)) { days=29; }<br />
else { days=28; }<br />
}<br />
return (days);<br />
}<br />
function isLeapYear (Year) {<br />
if (((Year % 4)==0) && ((Year % 100)!=0) || ((Year % 400)==0)) {<br />
return (true);<br />
} else { return (false); }<br />
}<br />
// End --><br />
</SCRIPT>
¿øÇÏ´Â ´Þ°ú ³âµµ¸¦ ¼±ÅÃÇϼ¼¿ä
|
|
³×ƼÁð ÀÇ°ß ÀÌ¿ëÇϽŠÀÚ·áÀÇ Èı⸦ ÀÚÀ¯·Ó°Ô ÀÛ¼ºÇϼ¼¿ä. (»ó¾÷ÀûÀÎ ±¤°í ¹× µµ¹è¼º ±Û µîÀº »çÀüÅ뺸¾øÀÌ »èÁ¦µÉ ¼ö ÀÖ½À´Ï´Ù.) |
|