<script language="javascript">

function AutoCursor(form) // 주민번호 앞자리 입력시 뒷자리 입력칸으로 자동이동
{
if (form.jumin1.value.length >5)
{
form.jumin2.focus();
form.jumin2.select();
}
}

</script>
</head>


<table border="0" cellpadding="0" cellspacing="0">
<form name="form">
<tr>
<td>이름</td>
<td width="6"></td>
<td><input type="text" name="name" size="12" maxlength="8" value=""></td>
<td width="20"></td>
<td style="padding-top:2">주민등록번호</td>
<td width="6"></td>
<td><input type="text" name="jumin1" size="6" maxlength="6" onKeyup="AutoCursor(this.form);" value=""> - <input type="text" name="jumin2" size="7" maxlength="7" value=""></td>
<td width="20"></td>
<td><input type="submit" value="확인"></td>
</tr>
</form>
</table>

반응형