폼태그에서 탭(tab)키 눌렀을때 이동순서 정하기
Programming/JavaScript
2007. 7. 24. 12:11
반응형
입력폼 양식에서 탭키를 누르면 다음항목으로 이동합니다.
이때 tabindex="1" 을 이용해 이동 순서를 정해줄수가 있지요
이름 : <input type="text" name="name" tabindex="1"><br>
비밀번호: <input type="password" name="pwd" tabindex="3"><br>
전화번호: <input type="text" name="tel" tabindex="2"><br>
주소: <input type="text" name="addr" tabindex="4"><br>
단, onfocus=blur() 가 적용되어 있다면 이동하지 않는다.
ex .) <input onfocus=blur() type=........
이때 tabindex="1" 을 이용해 이동 순서를 정해줄수가 있지요
이름 : <input type="text" name="name" tabindex="1"><br>
비밀번호: <input type="password" name="pwd" tabindex="3"><br>
전화번호: <input type="text" name="tel" tabindex="2"><br>
주소: <input type="text" name="addr" tabindex="4"><br>
단, onfocus=blur() 가 적용되어 있다면 이동하지 않는다.
ex .) <input onfocus=blur() type=........
반응형