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,972
12년 전 조회 3,778
12년 전 조회 1만
12년 전 조회 2,332
12년 전 조회 2,285
12년 전 조회 2,728
12년 전 조회 2,200
12년 전 조회 2,341
12년 전 조회 4,619
12년 전 조회 2,571
12년 전 조회 3,219
12년 전 조회 2,224
12년 전 조회 2,387
12년 전 조회 4,113
12년 전 조회 1,953
12년 전 조회 2,447
12년 전 조회 2,765
12년 전 조회 3,207
12년 전 조회 3,308
12년 전 조회 3,785
12년 전 조회 2,218
12년 전 조회 2,240
12년 전 조회 5,625
12년 전 조회 2,688
12년 전 조회 2,856
13년 전 조회 6,714
13년 전 조회 4,430
13년 전 조회 3,347
13년 전 조회 2,532
13년 전 조회 4,701
13년 전 조회 3,693
13년 전 조회 3,392
13년 전 조회 3,046
13년 전 조회 2,745
13년 전 조회 2,729
13년 전 조회 2,471
13년 전 조회 3,587
13년 전 조회 2,886
13년 전 조회 2,543
13년 전 조회 3,607
13년 전 조회 2,812
13년 전 조회 3,413
13년 전 조회 4,647
13년 전 조회 2,415
13년 전 조회 3,399
13년 전 조회 2,228
13년 전 조회 2,698
13년 전 조회 3,327
13년 전 조회 2,961
13년 전 조회 5,751
13년 전 조회 3,888
13년 전 조회 4,075
13년 전 조회 2,421
13년 전 조회 9,736
13년 전 조회 4,581
13년 전 조회 2,642
13년 전 조회 2,509
13년 전 조회 3,892
13년 전 조회 6,620
13년 전 조회 4,625
13년 전 조회 2,545
13년 전 조회 1.5만
13년 전 조회 2,432
13년 전 조회 1,854
13년 전 조회 5,142
13년 전 조회 2,635
13년 전 조회 1.1만
13년 전 조회 2,026
13년 전 조회 2,450
13년 전 조회 4,478
13년 전 조회 2,069
13년 전 조회 2,973
13년 전 조회 4,915
13년 전 조회 2,287
13년 전 조회 2,194
13년 전 조회 6,565
13년 전 조회 2,656
13년 전 조회 1,986
13년 전 조회 3,737
13년 전 조회 3,752
13년 전 조회 2,703
13년 전 조회 4,157
13년 전 조회 7,822
13년 전 조회 3,396
13년 전 조회 1,979
13년 전 조회 3,138
13년 전 조회 3,079
13년 전 조회 3,873
13년 전 조회 1,838
13년 전 조회 2,940
13년 전 조회 1,993
13년 전 조회 3,016
13년 전 조회 3,929
13년 전 조회 2,429
13년 전 조회 5,117
13년 전 조회 1.1만
13년 전 조회 2,387
13년 전 조회 3,733
13년 전 조회 3,354
13년 전 조회 4,225