다음 <input type=text로 커서 옮기기 > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

다음 <input type=text로 커서 옮기기 정보

기타 다음 <input type=text로 커서 옮기기

본문

<input
 type=text name=cp_no1 size=4 maxlength=4
onKeyUp="javascript:go_next( this, this.form.cp_no2);">-<input
 type=text name=cp_no2 size=4 maxlength=4
onKeyUp="javascript:go_next( this, this.form.cp_no3);">-<input
 type=text name=cp_no3 size=4 maxlength=4
onKeyUp="javascript:go_next( this, this.form.cp_no4);">-<input
 type=text name=cp_no4 size=4 maxlength=4 >

<script language=javascript>
function go_next( cur, entity) {
    if( cur.value.length >= cur.getAttribute('maxlength')) {
        entity.blur();
        entity.focus();
    }
}
</script><div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
추천
0
  • 복사

댓글 4개

editplus에서 보니까 none1AB.htm을 찾아대면서 개체가 필요하다는 스크립트 에러를 날리는데요.^^
무슨 심오한 뜻이 계신가 봅니당,, ~~**
예; form을 씌워주니까 에러없이 잘됩니다.

지정된 입력값이 만족되면 자동으로 다음으로 넘겨주네요,
shift+Tab가 허용되지 않는군요,

감사합니다.
© SIRSOFT
현재 페이지 제일 처음으로