<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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 8230 | 9년 전 | 115 | ||
| 8229 | 9년 전 | 110 | ||
| 8228 |
커네드커네드
|
9년 전 | 154 | |
| 8227 | 9년 전 | 190 | ||
| 8226 | 9년 전 | 207 | ||
| 8225 | 9년 전 | 190 | ||
| 8224 | 9년 전 | 183 | ||
| 8223 | 9년 전 | 161 | ||
| 8222 |
|
9년 전 | 239 | |
| 8221 | 9년 전 | 143 | ||
| 8220 | 9년 전 | 177 | ||
| 8219 | 9년 전 | 140 | ||
| 8218 | 9년 전 | 187 | ||
| 8217 |
star3840
|
9년 전 | 158 | |
| 8216 | 9년 전 | 222 | ||
| 8215 | 9년 전 | 176 | ||
| 8214 | 9년 전 | 269 | ||
| 8213 | 9년 전 | 223 | ||
| 8212 | 9년 전 | 138 | ||
| 8211 | 9년 전 | 307 | ||
| 8210 | 9년 전 | 315 | ||
| 8209 | 9년 전 | 389 | ||
| 8208 | 9년 전 | 281 | ||
| 8207 | 9년 전 | 282 | ||
| 8206 |
|
9년 전 | 241 | |
| 8205 | 9년 전 | 222 | ||
| 8204 | 9년 전 | 194 | ||
| 8203 | 9년 전 | 271 | ||
| 8202 | 9년 전 | 190 | ||
| 8201 | 9년 전 | 232 | ||
| 8200 | 9년 전 | 231 | ||
| 8199 | 9년 전 | 255 | ||
| 8198 | 9년 전 | 220 | ||
| 8197 | 9년 전 | 211 | ||
| 8196 | 9년 전 | 605 | ||
| 8195 | 9년 전 | 212 | ||
| 8194 | 9년 전 | 327 | ||
| 8193 | 9년 전 | 219 | ||
| 8192 | 9년 전 | 249 | ||
| 8191 | 9년 전 | 201 | ||
| 8190 | 9년 전 | 200 | ||
| 8189 | 9년 전 | 253 | ||
| 8188 | 9년 전 | 191 | ||
| 8187 | 9년 전 | 190 | ||
| 8186 | 9년 전 | 195 | ||
| 8185 | 9년 전 | 367 | ||
| 8184 | 9년 전 | 150 | ||
| 8183 | 9년 전 | 369 | ||
| 8182 | 9년 전 | 224 | ||
| 8181 | 9년 전 | 183 | ||
| 8180 | 9년 전 | 760 | ||
| 8179 | 9년 전 | 532 | ||
| 8178 | 9년 전 | 380 | ||
| 8177 |
kiplayer
|
9년 전 | 387 | |
| 8176 | 9년 전 | 416 | ||
| 8175 | 9년 전 | 290 | ||
| 8174 | 9년 전 | 294 | ||
| 8173 | 9년 전 | 387 | ||
| 8172 | 9년 전 | 252 | ||
| 8171 | 9년 전 | 229 | ||
| 8170 | 9년 전 | 346 | ||
| 8169 |
커네드커네드
|
9년 전 | 305 | |
| 8168 | 9년 전 | 374 | ||
| 8167 | 9년 전 | 371 | ||
| 8166 | 9년 전 | 279 | ||
| 8165 | 9년 전 | 218 | ||
| 8164 | 9년 전 | 360 | ||
| 8163 | 9년 전 | 347 | ||
| 8162 | 9년 전 | 354 | ||
| 8161 | 9년 전 | 367 | ||
| 8160 |
|
9년 전 | 557 | |
| 8159 | 9년 전 | 499 | ||
| 8158 | 9년 전 | 310 | ||
| 8157 | 9년 전 | 425 | ||
| 8156 | 9년 전 | 310 | ||
| 8155 | 9년 전 | 301 | ||
| 8154 |
00년생용띠
|
9년 전 | 642 | |
| 8153 | 9년 전 | 282 | ||
| 8152 |
|
9년 전 | 463 | |
| 8151 | 9년 전 | 461 | ||
| 8150 | 9년 전 | 567 | ||
| 8149 |
Jangfolk
|
9년 전 | 411 | |
| 8148 | 9년 전 | 232 | ||
| 8147 | 9년 전 | 431 | ||
| 8146 | 9년 전 | 503 | ||
| 8145 | 9년 전 | 456 | ||
| 8144 | 9년 전 | 421 | ||
| 8143 | 9년 전 | 253 | ||
| 8142 | 9년 전 | 480 | ||
| 8141 | 9년 전 | 428 | ||
| 8140 | 9년 전 | 976 | ||
| 8139 | 9년 전 | 328 | ||
| 8138 |
전갈자리남자
|
9년 전 | 435 | |
| 8137 | 9년 전 | 465 | ||
| 8136 | 9년 전 | 799 | ||
| 8135 |
|
9년 전 | 836 | |
| 8134 |
PlayPixel
|
9년 전 | 575 | |
| 8133 |
|
9년 전 | 491 | |
| 8132 | 9년 전 | 508 | ||
| 8131 | 9년 전 | 876 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기