COMING SOON 🚀

s

출생년도에 따른 나이 계산 자바스크립트

안녕하세요
다른것 개발 하다가 소스가 깔끔하지 못하지만... ^^;
사용하시면 도움이 될듯 합니다. ^^

function ck_age() {
var year=parseInt(new Date().getYear());
var age=document.getElementsByName('birth');
var ck=parseInt(age[0].value.substr(0,4));
form.age.value=(year-ck)+1; // 우리나라 나이 표시 +1 더함
}

<tr>
<td> 출생년도</td>
<td><input type="text" name="birth" size=5 maxlength=4 onKeyUp="num_chk(this)" onBlur="ck_age()"></td>
</tr>
<tr>
<td> 나이</td>
<td><input type="text" name="age" size=2 maxlength=2></td>
</tr>
01안녕하세요
02다른것 개발 하다가 소스가 깔끔하지 못하지만... ^^;
03사용하시면 도움이 될듯 합니다. ^^
04
05function ck_age() {
06 var year=parseInt(new Date().getYear());
07 var age=document.getElementsByName('birth');
08 var ck=parseInt(age[0].value.substr(0,4));
09 form.age.value=(year-ck)+1; // 우리나라 나이 표시 +1 더함
10}
11
12<tr>
13<td> 출생년도</td>
14<td><input type="text" name="birth" size=5 maxlength=4 onKeyUp="num_chk(this)" onBlur="ck_age()"></td>
15</tr>
16<tr>
17<td> 나이</td>
18<td><input type="text" name="age" size=2 maxlength=2></td>
19</tr>
|

댓글 1개

댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
12년 전 조회 1,984
12년 전 조회 3,782
12년 전 조회 1만
12년 전 조회 2,344
12년 전 조회 2,291
12년 전 조회 2,731
12년 전 조회 2,203
12년 전 조회 2,348
12년 전 조회 4,625
12년 전 조회 2,576
12년 전 조회 3,232
12년 전 조회 2,233
12년 전 조회 2,391
12년 전 조회 4,118
12년 전 조회 1,962
12년 전 조회 2,457
12년 전 조회 2,776
12년 전 조회 3,213
12년 전 조회 3,319
12년 전 조회 3,795
12년 전 조회 2,229
12년 전 조회 2,250
12년 전 조회 5,633
12년 전 조회 2,695
12년 전 조회 2,863
13년 전 조회 6,719
13년 전 조회 4,433
13년 전 조회 3,356
13년 전 조회 2,542
13년 전 조회 4,710
13년 전 조회 3,704
13년 전 조회 3,403
13년 전 조회 3,050
13년 전 조회 2,751
13년 전 조회 2,736
13년 전 조회 2,474
13년 전 조회 3,598
13년 전 조회 2,895
13년 전 조회 2,558
13년 전 조회 3,615
13년 전 조회 2,821
13년 전 조회 3,422
13년 전 조회 4,654
13년 전 조회 2,423
13년 전 조회 3,408
13년 전 조회 2,239
13년 전 조회 2,701
13년 전 조회 3,332
13년 전 조회 2,971
13년 전 조회 5,758
13년 전 조회 3,894
13년 전 조회 4,080
13년 전 조회 2,428
13년 전 조회 9,745
13년 전 조회 4,596
13년 전 조회 2,649
13년 전 조회 2,518
13년 전 조회 3,898
13년 전 조회 6,629
13년 전 조회 4,633
13년 전 조회 2,550
13년 전 조회 1.5만
13년 전 조회 2,439
13년 전 조회 1,860
13년 전 조회 5,142
13년 전 조회 2,635
13년 전 조회 1.1만
13년 전 조회 2,034
13년 전 조회 2,451
13년 전 조회 4,487
13년 전 조회 2,078
13년 전 조회 2,981
13년 전 조회 4,920
13년 전 조회 2,299
13년 전 조회 2,202
13년 전 조회 6,574
13년 전 조회 2,663
13년 전 조회 1,994
13년 전 조회 3,743
13년 전 조회 3,759
13년 전 조회 2,712
13년 전 조회 4,163
13년 전 조회 7,828
13년 전 조회 3,399
13년 전 조회 1,993
13년 전 조회 3,144
13년 전 조회 3,085
13년 전 조회 3,882
13년 전 조회 1,842
13년 전 조회 2,949
13년 전 조회 1,993
13년 전 조회 3,027
13년 전 조회 3,936
13년 전 조회 2,430
13년 전 조회 5,126
13년 전 조회 1.1만
13년 전 조회 2,392
13년 전 조회 3,740
13년 전 조회 3,362
13년 전 조회 4,225