<script language="javascript">
function gogogo() {
var ri = check_date(document.all.year.value,document.all.month.value,document.all.day.value)
if (ri == 0) {
alert('정상적인 형식');
} else if (ri == 1) {
alert('년(?)이 잘못 되었습니다');
} else if (ri == 2) {
alert('월이 잘못 되었습니다');
} else if (ri == 3) {
alert('일이 잘못 되었습니다');
}
}
function check_date(year, month, day) {
var dat_option = year % 4;
year = parseInt(year, 10);
month = parseInt(month, 10);
day = parseInt(day, 10);
if (isNaN(year) == true) { return 1; }
if (year < 1970) { return 1; }
if (isNaN(month) == true) { return 2; }
if (isNaN(day) == true) { return 3; }
if (day < 1 || day > 31) { return 3; }
if (month == 2) {
if (((dat_option == 0) && (day > 29)) || ((dat_option != 0) && (day > 28)) ) { return 3; }
} else if ((month == 4) ||
(month == 6) ||
(month == 9) ||
(month == 11)) {
if (day > 30) { return 3; }
} else if ((month == 1) ||
(month == 3) ||
(month == 5) ||
(month == 7) ||
(month == 8) ||
(month == 10) ||
(month == 12)) {
if (day > 31) { return 3; }
} else {
return 2;
}
return 0;
}
</script>
<input type="text" name="year"> 년
<input type="text" name="month"> 월
<input type="text" name="day"> 일
<input type="button" value="확인" onclick="gogogo();"><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
function gogogo() {
var ri = check_date(document.all.year.value,document.all.month.value,document.all.day.value)
if (ri == 0) {
alert('정상적인 형식');
} else if (ri == 1) {
alert('년(?)이 잘못 되었습니다');
} else if (ri == 2) {
alert('월이 잘못 되었습니다');
} else if (ri == 3) {
alert('일이 잘못 되었습니다');
}
}
function check_date(year, month, day) {
var dat_option = year % 4;
year = parseInt(year, 10);
month = parseInt(month, 10);
day = parseInt(day, 10);
if (isNaN(year) == true) { return 1; }
if (year < 1970) { return 1; }
if (isNaN(month) == true) { return 2; }
if (isNaN(day) == true) { return 3; }
if (day < 1 || day > 31) { return 3; }
if (month == 2) {
if (((dat_option == 0) && (day > 29)) || ((dat_option != 0) && (day > 28)) ) { return 3; }
} else if ((month == 4) ||
(month == 6) ||
(month == 9) ||
(month == 11)) {
if (day > 30) { return 3; }
} else if ((month == 1) ||
(month == 3) ||
(month == 5) ||
(month == 7) ||
(month == 8) ||
(month == 10) ||
(month == 12)) {
if (day > 31) { return 3; }
} else {
return 2;
}
return 0;
}
</script>
<input type="text" name="year"> 년
<input type="text" name="month"> 월
<input type="text" name="day"> 일
<input type="button" value="확인" onclick="gogogo();"><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 1230 |
|
18년 전 | 2024 | |
| 1229 |
|
18년 전 | 2961 | |
| 1228 |
|
18년 전 | 2643 | |
| 1227 | 18년 전 | 2944 | ||
| 1226 | 18년 전 | 2372 | ||
| 1225 |
|
18년 전 | 2444 | |
| 1224 | 18년 전 | 2754 | ||
| 1223 |
|
18년 전 | 4000 | |
| 1222 |
mixdesign
|
18년 전 | 2642 | |
| 1221 |
|
18년 전 | 2762 | |
| 1220 | 18년 전 | 3221 | ||
| 1219 | 18년 전 | 2930 | ||
| 1218 | 18년 전 | 2126 | ||
| 1217 |
|
18년 전 | 2568 | |
| 1216 | 18년 전 | 2587 | ||
| 1215 |
mixdesign
|
18년 전 | 4073 | |
| 1214 |
|
18년 전 | 4802 | |
| 1213 | 18년 전 | 2334 | ||
| 1212 |
mixdesign
|
18년 전 | 2512 | |
| 1211 |
|
18년 전 | 2439 | |
| 1210 | 18년 전 | 3771 | ||
| 1209 |
mixdesign
|
18년 전 | 2385 | |
| 1208 |
mixdesign
|
18년 전 | 2390 | |
| 1207 |
mixdesign
|
18년 전 | 1737 | |
| 1206 |
mixdesign
|
18년 전 | 2015 | |
| 1205 |
mixdesign
|
18년 전 | 2713 | |
| 1204 |
mixdesign
|
18년 전 | 3585 | |
| 1203 | 18년 전 | 3107 | ||
| 1202 | 18년 전 | 2991 | ||
| 1201 | 18년 전 | 2041 | ||
| 1200 | 18년 전 | 4138 | ||
| 1199 | 18년 전 | 2181 | ||
| 1198 | 18년 전 | 4201 | ||
| 1197 | 18년 전 | 2516 | ||
| 1196 | 18년 전 | 2376 | ||
| 1195 |
|
18년 전 | 3484 | |
| 1194 | 18년 전 | 2256 | ||
| 1193 | 18년 전 | 2163 | ||
| 1192 | 18년 전 | 3280 | ||
| 1191 | 18년 전 | 3972 | ||
| 1190 | 18년 전 | 2232 | ||
| 1189 |
|
18년 전 | 2378 | |
| 1188 |
|
18년 전 | 3842 | |
| 1187 | 18년 전 | 2726 | ||
| 1186 | 18년 전 | 3391 | ||
| 1185 | 18년 전 | 2799 | ||
| 1184 | 18년 전 | 1681 | ||
| 1183 | 18년 전 | 2152 | ||
| 1182 | 18년 전 | 3719 | ||
| 1181 |
mermaid
|
18년 전 | 2933 | |
| 1180 | 18년 전 | 2990 | ||
| 1179 | 18년 전 | 3618 | ||
| 1178 | 18년 전 | 2183 | ||
| 1177 |
|
18년 전 | 2297 | |
| 1176 | 18년 전 | 3188 | ||
| 1175 | 18년 전 | 1890 | ||
| 1174 |
|
18년 전 | 2244 | |
| 1173 |
|
18년 전 | 2535 | |
| 1172 | 18년 전 | 1783 | ||
| 1171 | 18년 전 | 2121 | ||
| 1170 | 18년 전 | 2001 | ||
| 1169 | 18년 전 | 2516 | ||
| 1168 | 18년 전 | 1942 | ||
| 1167 | 18년 전 | 1734 | ||
| 1166 | 18년 전 | 1757 | ||
| 1165 | 18년 전 | 1740 | ||
| 1164 | 18년 전 | 2811 | ||
| 1163 | 18년 전 | 1570 | ||
| 1162 |
|
18년 전 | 5686 | |
| 1161 |
이걸~어쩌나~
|
18년 전 | 2418 | |
| 1160 | 18년 전 | 1678 | ||
| 1159 | 18년 전 | 4709 | ||
| 1158 | 18년 전 | 2059 | ||
| 1157 | 18년 전 | 4849 | ||
| 1156 | 18년 전 | 3199 | ||
| 1155 | 18년 전 | 2141 | ||
| 1154 | 18년 전 | 1840 | ||
| 1153 |
BEST79
|
18년 전 | 2121 | |
| 1152 | 18년 전 | 1740 | ||
| 1151 | 18년 전 | 1850 | ||
| 1150 | 18년 전 | 1854 | ||
| 1149 |
inniskun
|
18년 전 | 2491 | |
| 1148 |
|
18년 전 | 3514 | |
| 1147 |
|
18년 전 | 5982 | |
| 1146 |
|
18년 전 | 3875 | |
| 1145 | 18년 전 | 3068 | ||
| 1144 | 18년 전 | 2155 | ||
| 1143 | 18년 전 | 2427 | ||
| 1142 | 18년 전 | 2215 | ||
| 1141 |
|
18년 전 | 2319 | |
| 1140 | 18년 전 | 2424 | ||
| 1139 | 18년 전 | 2852 | ||
| 1138 | 18년 전 | 2547 | ||
| 1137 | 18년 전 | 2005 | ||
| 1136 | 18년 전 | 3136 | ||
| 1135 | 18년 전 | 3601 | ||
| 1134 | 18년 전 | 3846 | ||
| 1133 |
자반고등어
|
18년 전 | 3354 | |
| 1132 | 18년 전 | 3404 | ||
| 1131 | 18년 전 | 2582 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기