text 필드에 maxLength를 체크하여 지정된 곳으로 focus 를 이동시킨다.

<script language=”javascript”>
function moveNext(varControl, varNext)
{
if(varControl.value.length == varControl.maxLength)
{
varNext.focus();
varNext.select();
}
}
</script>
<form>
<input type=”text” name=”jumin1″ size=”6″ maxlength=”6″ OnKeyUp=”moveNext(this, jumin2);”>
<input type=”text” name=”jumin2″ size=”7″ maxlength=”7″ OnKeyUp=”moveNext(this, jumin1);”>
</form>