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

<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년 전 조회 1,889
16년 전 조회 3,753
16년 전 조회 4,598
16년 전 조회 3,240
16년 전 조회 2,496
16년 전 조회 2,584
16년 전 조회 2,826
16년 전 조회 2,335
16년 전 조회 5,705
16년 전 조회 3,526
16년 전 조회 1,516
16년 전 조회 1,853
16년 전 조회 5,216
16년 전 조회 2,471
16년 전 조회 3,554
16년 전 조회 2,825
16년 전 조회 1,705
16년 전 조회 5,532
16년 전 조회 2,649
16년 전 조회 6,133
16년 전 조회 2,086
16년 전 조회 4,162
16년 전 조회 3,182
16년 전 조회 2,368
16년 전 조회 2,389
16년 전 조회 4,556
16년 전 조회 3,434
16년 전 조회 2,971
16년 전 조회 3,115
16년 전 조회 2,224
16년 전 조회 1,915
16년 전 조회 1,837
16년 전 조회 1,538
16년 전 조회 1,826
16년 전 조회 2,047
16년 전 조회 1,741
16년 전 조회 4,996
16년 전 조회 3,996
16년 전 조회 1,934
16년 전 조회 1,684
16년 전 조회 2,430
16년 전 조회 4,698
16년 전 조회 3,689
16년 전 조회 2,738
16년 전 조회 4,474
16년 전 조회 3,343
16년 전 조회 1,499
16년 전 조회 1,520
16년 전 조회 2,186
16년 전 조회 2,034
16년 전 조회 2,751
16년 전 조회 2,368
16년 전 조회 1,517
16년 전 조회 4,543
16년 전 조회 1,630
16년 전 조회 1,936
16년 전 조회 2,351
16년 전 조회 4,014
16년 전 조회 2,915
16년 전 조회 1,621
16년 전 조회 4,192
16년 전 조회 1,544
16년 전 조회 1,721
16년 전 조회 1,388
16년 전 조회 1,854
16년 전 조회 1,755
16년 전 조회 1,772
16년 전 조회 1,560
16년 전 조회 2,325
16년 전 조회 1,944
16년 전 조회 2,117
16년 전 조회 2,325
16년 전 조회 1,620
16년 전 조회 2,482
16년 전 조회 2,382
16년 전 조회 4,672
16년 전 조회 1,451
16년 전 조회 1,188
16년 전 조회 2,149
16년 전 조회 2,120
16년 전 조회 1,661
16년 전 조회 2,227
16년 전 조회 2,423
16년 전 조회 1,528
16년 전 조회 1,884
16년 전 조회 2,064
16년 전 조회 1,149
16년 전 조회 1,854
16년 전 조회 1,543
16년 전 조회 2,046
16년 전 조회 1,463
16년 전 조회 2,358
16년 전 조회 2,043
16년 전 조회 6,041
16년 전 조회 2,057
16년 전 조회 3,838
16년 전 조회 1,596
16년 전 조회 1,884
16년 전 조회 2,237
16년 전 조회 2,772