WEB 웹/JAVASCRIPT

onKeyUp 으로 input 다음칸으로 자동 이동

KIMSG 2017. 7. 24. 14:39
onKeyUp="moveFocus(3,this,this.form.userTelNo2);"

를 사용해서.....  

1
2
3
4
5
function moveFocus(num,here,next){
 var str = here.value.length;
 if(str == num)
    next.focus();
 }
cs


넘겨주면 된다....

그러면 자동으로 input 창이 지정한 name의 input 창으로 넘어감....