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,986
12년 전 조회 3,782
12년 전 조회 1만
12년 전 조회 2,344
12년 전 조회 2,291
12년 전 조회 2,734
12년 전 조회 2,206
12년 전 조회 2,351
12년 전 조회 4,626
12년 전 조회 2,578
12년 전 조회 3,233
12년 전 조회 2,236
12년 전 조회 2,394
12년 전 조회 4,120
12년 전 조회 1,963
12년 전 조회 2,457
12년 전 조회 2,776
12년 전 조회 3,213
12년 전 조회 3,320
12년 전 조회 3,795
12년 전 조회 2,229
12년 전 조회 2,250
12년 전 조회 5,633
12년 전 조회 2,698
12년 전 조회 2,868
13년 전 조회 6,721
13년 전 조회 4,434
13년 전 조회 3,356
13년 전 조회 2,542
13년 전 조회 4,710
13년 전 조회 3,704
13년 전 조회 3,403
13년 전 조회 3,051
13년 전 조회 2,754
13년 전 조회 2,737
13년 전 조회 2,475
13년 전 조회 3,598
13년 전 조회 2,900
13년 전 조회 2,559
13년 전 조회 3,615
13년 전 조회 2,822
13년 전 조회 3,422
13년 전 조회 4,654
13년 전 조회 2,426
13년 전 조회 3,409
13년 전 조회 2,239
13년 전 조회 2,701
13년 전 조회 3,335
13년 전 조회 2,972
13년 전 조회 5,759
13년 전 조회 3,896
13년 전 조회 4,082
13년 전 조회 2,429
13년 전 조회 9,747
13년 전 조회 4,598
13년 전 조회 2,649
13년 전 조회 2,518
13년 전 조회 3,899
13년 전 조회 6,631
13년 전 조회 4,635
13년 전 조회 2,551
13년 전 조회 1.5만
13년 전 조회 2,439
13년 전 조회 1,862
13년 전 조회 5,142
13년 전 조회 2,635
13년 전 조회 1.1만
13년 전 조회 2,035
13년 전 조회 2,451
13년 전 조회 4,490
13년 전 조회 2,078
13년 전 조회 2,983
13년 전 조회 4,923
13년 전 조회 2,300
13년 전 조회 2,202
13년 전 조회 6,574
13년 전 조회 2,665
13년 전 조회 1,997
13년 전 조회 3,745
13년 전 조회 3,759
13년 전 조회 2,713
13년 전 조회 4,164
13년 전 조회 7,829
13년 전 조회 3,400
13년 전 조회 1,993
13년 전 조회 3,144
13년 전 조회 3,088
13년 전 조회 3,883
13년 전 조회 1,843
13년 전 조회 2,952
13년 전 조회 1,993
13년 전 조회 3,029
13년 전 조회 3,937
13년 전 조회 2,430
13년 전 조회 5,128
13년 전 조회 1.1만
13년 전 조회 2,392
13년 전 조회 3,740
13년 전 조회 3,362
13년 전 조회 4,225