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

<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,853
16년 전 조회 3,712
16년 전 조회 4,559
16년 전 조회 3,206
16년 전 조회 2,464
16년 전 조회 2,550
16년 전 조회 2,784
16년 전 조회 2,288
16년 전 조회 5,661
16년 전 조회 3,482
16년 전 조회 1,463
16년 전 조회 1,817
16년 전 조회 5,181
16년 전 조회 2,425
16년 전 조회 3,509
16년 전 조회 2,788
16년 전 조회 1,671
16년 전 조회 5,495
16년 전 조회 2,603
16년 전 조회 6,089
16년 전 조회 2,047
16년 전 조회 4,123
16년 전 조회 3,146
16년 전 조회 2,323
16년 전 조회 2,345
16년 전 조회 4,508
16년 전 조회 3,403
16년 전 조회 2,938
16년 전 조회 3,078
16년 전 조회 2,198
16년 전 조회 1,883
16년 전 조회 1,806
16년 전 조회 1,510
16년 전 조회 1,791
16년 전 조회 2,008
16년 전 조회 1,709
16년 전 조회 4,956
16년 전 조회 3,960
16년 전 조회 1,903
16년 전 조회 1,652
16년 전 조회 2,392
16년 전 조회 4,659
16년 전 조회 3,655
16년 전 조회 2,702
16년 전 조회 4,442
16년 전 조회 3,314
16년 전 조회 1,467
16년 전 조회 1,485
16년 전 조회 2,149
16년 전 조회 1,997
16년 전 조회 2,718
16년 전 조회 2,332
16년 전 조회 1,478
16년 전 조회 4,509
16년 전 조회 1,594
16년 전 조회 1,894
16년 전 조회 2,312
16년 전 조회 3,984
16년 전 조회 2,882
16년 전 조회 1,590
16년 전 조회 4,160
16년 전 조회 1,508
16년 전 조회 1,687
16년 전 조회 1,356
16년 전 조회 1,825
16년 전 조회 1,731
16년 전 조회 1,741
16년 전 조회 1,522
16년 전 조회 2,285
16년 전 조회 1,916
16년 전 조회 2,077
16년 전 조회 2,295
16년 전 조회 1,584
16년 전 조회 2,457
16년 전 조회 2,356
16년 전 조회 4,637
16년 전 조회 1,416
16년 전 조회 1,153
16년 전 조회 2,113
16년 전 조회 2,085
16년 전 조회 1,624
16년 전 조회 2,177
16년 전 조회 2,391
16년 전 조회 1,496
16년 전 조회 1,857
16년 전 조회 2,035
16년 전 조회 1,121
16년 전 조회 1,819
16년 전 조회 1,505
16년 전 조회 2,018
16년 전 조회 1,427
16년 전 조회 2,321
16년 전 조회 2,004
16년 전 조회 6,003
16년 전 조회 2,023
16년 전 조회 3,801
16년 전 조회 1,565
16년 전 조회 1,855
16년 전 조회 2,210
16년 전 조회 2,731