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,938
12년 전 조회 3,743
12년 전 조회 1만
12년 전 조회 2,296
12년 전 조회 2,251
12년 전 조회 2,695
12년 전 조회 2,165
12년 전 조회 2,316
12년 전 조회 4,578
12년 전 조회 2,525
12년 전 조회 3,193
12년 전 조회 2,186
12년 전 조회 2,349
12년 전 조회 4,074
12년 전 조회 1,918
12년 전 조회 2,410
12년 전 조회 2,729
12년 전 조회 3,171
12년 전 조회 3,271
12년 전 조회 3,744
12년 전 조회 2,179
12년 전 조회 2,213
12년 전 조회 5,593
12년 전 조회 2,644
12년 전 조회 2,825
12년 전 조회 6,669
12년 전 조회 4,397
12년 전 조회 3,311
13년 전 조회 2,495
13년 전 조회 4,667
13년 전 조회 3,662
13년 전 조회 3,362
13년 전 조회 3,009
13년 전 조회 2,701
13년 전 조회 2,708
13년 전 조회 2,440
13년 전 조회 3,550
13년 전 조회 2,851
13년 전 조회 2,510
13년 전 조회 3,574
13년 전 조회 2,785
13년 전 조회 3,382
13년 전 조회 4,603
13년 전 조회 2,379
13년 전 조회 3,372
13년 전 조회 2,190
13년 전 조회 2,664
13년 전 조회 3,292
13년 전 조회 2,934
13년 전 조회 5,723
13년 전 조회 3,843
13년 전 조회 4,042
13년 전 조회 2,383
13년 전 조회 9,701
13년 전 조회 4,549
13년 전 조회 2,598
13년 전 조회 2,468
13년 전 조회 3,865
13년 전 조회 6,584
13년 전 조회 4,595
13년 전 조회 2,516
13년 전 조회 1.5만
13년 전 조회 2,395
13년 전 조회 1,810
13년 전 조회 5,103
13년 전 조회 2,603
13년 전 조회 1만
13년 전 조회 1,989
13년 전 조회 2,413
13년 전 조회 4,447
13년 전 조회 2,044
13년 전 조회 2,944
13년 전 조회 4,886
13년 전 조회 2,256
13년 전 조회 2,169
13년 전 조회 6,532
13년 전 조회 2,633
13년 전 조회 1,954
13년 전 조회 3,701
13년 전 조회 3,719
13년 전 조회 2,674
13년 전 조회 4,117
13년 전 조회 7,788
13년 전 조회 3,369
13년 전 조회 1,936
13년 전 조회 3,102
13년 전 조회 3,046
13년 전 조회 3,836
13년 전 조회 1,807
13년 전 조회 2,903
13년 전 조회 1,953
13년 전 조회 2,994
13년 전 조회 3,889
13년 전 조회 2,383
13년 전 조회 5,086
13년 전 조회 1.1만
13년 전 조회 2,360
13년 전 조회 3,699
13년 전 조회 3,325
13년 전 조회 4,188