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,990
12년 전 조회 3,786
12년 전 조회 1만
12년 전 조회 2,346
12년 전 조회 2,293
12년 전 조회 2,740
12년 전 조회 2,209
12년 전 조회 2,357
12년 전 조회 4,630
12년 전 조회 2,578
12년 전 조회 3,241
12년 전 조회 2,239
12년 전 조회 2,398
12년 전 조회 4,125
12년 전 조회 1,967
12년 전 조회 2,463
12년 전 조회 2,783
12년 전 조회 3,217
12년 전 조회 3,328
12년 전 조회 3,802
12년 전 조회 2,234
12년 전 조회 2,252
12년 전 조회 5,636
12년 전 조회 2,701
12년 전 조회 2,869
13년 전 조회 6,724
13년 전 조회 4,439
13년 전 조회 3,361
13년 전 조회 2,550
13년 전 조회 4,718
13년 전 조회 3,705
13년 전 조회 3,409
13년 전 조회 3,053
13년 전 조회 2,756
13년 전 조회 2,737
13년 전 조회 2,476
13년 전 조회 3,601
13년 전 조회 2,904
13년 전 조회 2,561
13년 전 조회 3,615
13년 전 조회 2,823
13년 전 조회 3,428
13년 전 조회 4,662
13년 전 조회 2,426
13년 전 조회 3,413
13년 전 조회 2,245
13년 전 조회 2,706
13년 전 조회 3,336
13년 전 조회 2,977
13년 전 조회 5,763
13년 전 조회 3,903
13년 전 조회 4,084
13년 전 조회 2,431
13년 전 조회 9,750
13년 전 조회 4,600
13년 전 조회 2,655
13년 전 조회 2,525
13년 전 조회 3,899
13년 전 조회 6,635
13년 전 조회 4,638
13년 전 조회 2,558
13년 전 조회 1.5만
13년 전 조회 2,443
13년 전 조회 1,865
13년 전 조회 5,142
13년 전 조회 2,635
13년 전 조회 1.1만
13년 전 조회 2,038
13년 전 조회 2,451
13년 전 조회 4,495
13년 전 조회 2,083
13년 전 조회 2,988
13년 전 조회 4,923
13년 전 조회 2,313
13년 전 조회 2,207
13년 전 조회 6,575
13년 전 조회 2,667
13년 전 조회 2,000
13년 전 조회 3,750
13년 전 조회 3,767
13년 전 조회 2,716
13년 전 조회 4,168
13년 전 조회 7,833
13년 전 조회 3,402
13년 전 조회 1,994
13년 전 조회 3,154
13년 전 조회 3,089
13년 전 조회 3,886
13년 전 조회 1,846
13년 전 조회 2,958
13년 전 조회 1,994
13년 전 조회 3,030
13년 전 조회 3,942
13년 전 조회 2,431
13년 전 조회 5,132
13년 전 조회 1.1만
13년 전 조회 2,396
13년 전 조회 3,745
13년 전 조회 3,363
13년 전 조회 4,226