<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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 930 | 19년 전 | 3557 | ||
| 929 |
|
19년 전 | 2726 | |
| 928 |
|
19년 전 | 3465 | |
| 927 |
|
19년 전 | 3460 | |
| 926 |
|
19년 전 | 3157 | |
| 925 | 19년 전 | 5448 | ||
| 924 |
|
19년 전 | 2188 | |
| 923 |
|
19년 전 | 2246 | |
| 922 |
|
19년 전 | 2332 | |
| 921 |
|
19년 전 | 3423 | |
| 920 | 19년 전 | 3720 | ||
| 919 |
|
19년 전 | 3766 | |
| 918 |
|
19년 전 | 2383 | |
| 917 |
|
19년 전 | 2415 | |
| 916 |
|
19년 전 | 2721 | |
| 915 | 19년 전 | 3068 | ||
| 914 | 19년 전 | 2476 | ||
| 913 | 19년 전 | 2637 | ||
| 912 | 19년 전 | 2469 | ||
| 911 | 19년 전 | 2234 | ||
| 910 | 19년 전 | 3264 | ||
| 909 | 19년 전 | 3326 | ||
| 908 | 19년 전 | 3056 | ||
| 907 |
|
19년 전 | 4884 | |
| 906 |
|
19년 전 | 2726 | |
| 905 |
|
19년 전 | 3324 | |
| 904 |
|
19년 전 | 3169 | |
| 903 |
|
19년 전 | 2012 | |
| 902 |
|
19년 전 | 3164 | |
| 901 |
|
19년 전 | 1900 | |
| 900 |
|
19년 전 | 2355 | |
| 899 |
|
19년 전 | 2413 | |
| 898 |
|
19년 전 | 4005 | |
| 897 |
|
19년 전 | 3207 | |
| 896 |
|
19년 전 | 3121 | |
| 895 |
|
19년 전 | 2553 | |
| 894 |
|
19년 전 | 2032 | |
| 893 |
|
19년 전 | 1665 | |
| 892 |
|
19년 전 | 2430 | |
| 891 |
|
19년 전 | 2343 | |
| 890 |
|
19년 전 | 1826 | |
| 889 |
|
19년 전 | 1827 | |
| 888 |
|
19년 전 | 2621 | |
| 887 |
|
19년 전 | 2591 | |
| 886 |
|
19년 전 | 1881 | |
| 885 |
|
19년 전 | 2135 | |
| 884 |
|
19년 전 | 3318 | |
| 883 |
|
19년 전 | 1967 | |
| 882 |
|
19년 전 | 2516 | |
| 881 |
|
19년 전 | 2599 | |
| 880 |
|
19년 전 | 2676 | |
| 879 |
|
19년 전 | 2952 | |
| 878 |
|
19년 전 | 2573 | |
| 877 |
|
19년 전 | 2993 | |
| 876 |
|
19년 전 | 2772 | |
| 875 |
|
19년 전 | 3532 | |
| 874 | 19년 전 | 1884 | ||
| 873 | 19년 전 | 2752 | ||
| 872 |
|
19년 전 | 2386 | |
| 871 |
|
19년 전 | 2032 | |
| 870 |
|
19년 전 | 2438 | |
| 869 |
|
19년 전 | 1880 | |
| 868 |
|
19년 전 | 5453 | |
| 867 |
|
19년 전 | 2280 | |
| 866 |
|
19년 전 | 4283 | |
| 865 |
|
19년 전 | 2317 | |
| 864 | 19년 전 | 1868 | ||
| 863 | 19년 전 | 2624 | ||
| 862 | 19년 전 | 2345 | ||
| 861 | 19년 전 | 2543 | ||
| 860 | 19년 전 | 2186 | ||
| 859 | 19년 전 | 3934 | ||
| 858 | 19년 전 | 3431 | ||
| 857 | 19년 전 | 2218 | ||
| 856 |
Power
|
19년 전 | 2119 | |
| 855 | 19년 전 | 1979 | ||
| 854 | 19년 전 | 2016 | ||
| 853 |
pearly
|
19년 전 | 4418 | |
| 852 |
pearly
|
19년 전 | 3367 | |
| 851 | 19년 전 | 2792 | ||
| 850 |
pearly
|
19년 전 | 3365 | |
| 849 |
pearly
|
19년 전 | 3022 | |
| 848 |
pearly
|
19년 전 | 2860 | |
| 847 | 19년 전 | 2383 | ||
| 846 |
|
19년 전 | 2194 | |
| 845 |
pearly
|
19년 전 | 2516 | |
| 844 | 19년 전 | 3120 | ||
| 843 | 19년 전 | 2149 | ||
| 842 |
pearly
|
19년 전 | 3135 | |
| 841 |
pearly
|
19년 전 | 3259 | |
| 840 | 19년 전 | 2944 | ||
| 839 |
|
19년 전 | 1959 | |
| 838 |
|
19년 전 | 1720 | |
| 837 |
|
19년 전 | 2347 | |
| 836 |
|
19년 전 | 2290 | |
| 835 |
|
19년 전 | 1665 | |
| 834 |
|
19년 전 | 1682 | |
| 833 |
|
19년 전 | 1587 | |
| 832 |
|
19년 전 | 2077 | |
| 831 |
|
19년 전 | 1627 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기