엔터치면 다음칸으로 이동.

<html>
<head>
    <title>다음칸</title>
<script language='javascript'>

   var is_submit = true;
   var _NEXT_FOCUS = ""; // 커서가 갈 곳..

   function check_form(){

       f = document.form;

      if(is_submit == true){
         return true;
      }else{
         f[_NEXT_FOCUS].focus();
         is_submit = true;
         return false;
     }
   }

   function next_input(next_focus){
     if(event.keyCode == 13){
          is_submit = false;
         _NEXT_FOCUS = next_focus;
      }
   }

</script>


<body>
입력폼 아무곳에서나 엔터키를 쳐보세요..

<form name='form'>
   <input type='text' size=20 name='put1' onKeyDown="next_input('put2');"><br>
   <input type='text' size=20 name='put2' onKeyDown="next_input('put3');"><br>
   <input type='text' size=20 name='put3' onKeyDown="next_input('put4');"><br>
   <input type='text' size=20 name='put4' onKeyDown="next_input('put5');"><br>
   <input type='text' size=20 name='put5' onKeyDown="next_input('put1');"><br>
   <input type='submit' value='보내기' onClick='return check_form();'>
</form>

</body>
</html>
[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]
|

댓글 3개

댓글을 작성하시려면 로그인이 필요합니다.

프로그램

+
제목 글쓴이 날짜 조회
16년 전 조회 2,142
16년 전 조회 4,029
16년 전 조회 4,838
16년 전 조회 3,478
16년 전 조회 2,733
16년 전 조회 2,845
16년 전 조회 3,060
16년 전 조회 2,595
16년 전 조회 5,932
16년 전 조회 3,757
16년 전 조회 1,745
16년 전 조회 2,084
16년 전 조회 5,451
16년 전 조회 2,714
16년 전 조회 3,775
16년 전 조회 3,065
16년 전 조회 1,949
16년 전 조회 5,759
16년 전 조회 2,868
16년 전 조회 6,362
16년 전 조회 2,334
16년 전 조회 4,394
16년 전 조회 3,404
16년 전 조회 2,581
16년 전 조회 2,609
16년 전 조회 4,739
16년 전 조회 3,675
16년 전 조회 3,201
16년 전 조회 3,347
16년 전 조회 2,463
16년 전 조회 2,125
16년 전 조회 2,066
16년 전 조회 1,757
16년 전 조회 2,063
16년 전 조회 2,260
16년 전 조회 1,971
16년 전 조회 5,212
16년 전 조회 4,211
16년 전 조회 2,160
16년 전 조회 1,914
16년 전 조회 2,652
16년 전 조회 4,906
16년 전 조회 3,914
16년 전 조회 2,955
16년 전 조회 4,689
16년 전 조회 3,553
16년 전 조회 1,706
16년 전 조회 1,740
16년 전 조회 2,399
16년 전 조회 2,244
16년 전 조회 2,959
16년 전 조회 2,578
16년 전 조회 1,717
16년 전 조회 4,755
16년 전 조회 1,834
16년 전 조회 2,138
16년 전 조회 2,581
16년 전 조회 4,232
16년 전 조회 3,127
16년 전 조회 1,849
16년 전 조회 4,399
16년 전 조회 1,754
16년 전 조회 1,929
16년 전 조회 1,606
16년 전 조회 2,082
16년 전 조회 1,987
16년 전 조회 1,987
16년 전 조회 1,775
16년 전 조회 2,532
16년 전 조회 2,164
16년 전 조회 2,334
16년 전 조회 2,556
16년 전 조회 1,817
16년 전 조회 2,701
16년 전 조회 2,593
16년 전 조회 4,901
16년 전 조회 1,674
16년 전 조회 1,413
16년 전 조회 2,360
16년 전 조회 2,329
16년 전 조회 1,877
16년 전 조회 2,436
16년 전 조회 2,652
16년 전 조회 1,751
16년 전 조회 2,106
16년 전 조회 2,279
16년 전 조회 1,370
16년 전 조회 2,079
16년 전 조회 1,767
16년 전 조회 2,255
16년 전 조회 1,662
16년 전 조회 2,565
16년 전 조회 2,257
16년 전 조회 6,249
16년 전 조회 2,273
16년 전 조회 4,048
16년 전 조회 1,799
16년 전 조회 2,100
17년 전 조회 2,452
17년 전 조회 2,960