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

<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,759
16년 전 조회 3,615
16년 전 조회 4,451
16년 전 조회 3,116
16년 전 조회 2,362
16년 전 조회 2,453
16년 전 조회 2,693
16년 전 조회 2,183
16년 전 조회 5,524
16년 전 조회 3,383
16년 전 조회 1,373
16년 전 조회 1,715
16년 전 조회 5,088
16년 전 조회 2,327
16년 전 조회 3,424
16년 전 조회 2,664
16년 전 조회 1,577
16년 전 조회 5,373
16년 전 조회 2,492
16년 전 조회 5,983
16년 전 조회 1,958
16년 전 조회 4,032
16년 전 조회 3,047
16년 전 조회 2,233
16년 전 조회 2,251
16년 전 조회 4,411
16년 전 조회 3,316
16년 전 조회 2,847
16년 전 조회 2,988
16년 전 조회 2,105
16년 전 조회 1,786
16년 전 조회 1,701
16년 전 조회 1,417
16년 전 조회 1,689
16년 전 조회 1,919
16년 전 조회 1,618
16년 전 조회 4,856
16년 전 조회 3,843
16년 전 조회 1,811
16년 전 조회 1,552
16년 전 조회 2,297
16년 전 조회 4,529
16년 전 조회 3,566
16년 전 조회 2,593
16년 전 조회 4,353
16년 전 조회 3,218
16년 전 조회 1,373
16년 전 조회 1,390
16년 전 조회 2,051
16년 전 조회 1,897
16년 전 조회 2,579
16년 전 조회 2,247
16년 전 조회 1,386
16년 전 조회 4,399
16년 전 조회 1,497
16년 전 조회 1,795
16년 전 조회 2,222
16년 전 조회 3,857
16년 전 조회 2,751
16년 전 조회 1,507
16년 전 조회 4,029
16년 전 조회 1,414
16년 전 조회 1,594
16년 전 조회 1,261
16년 전 조회 1,733
16년 전 조회 1,635
16년 전 조회 1,645
16년 전 조회 1,435
16년 전 조회 2,191
16년 전 조회 1,830
16년 전 조회 1,986
16년 전 조회 2,197
16년 전 조회 1,488
16년 전 조회 2,322
16년 전 조회 2,266
16년 전 조회 4,547
16년 전 조회 1,311
16년 전 조회 1,065
16년 전 조회 2,025
16년 전 조회 1,992
16년 전 조회 1,527
16년 전 조회 2,053
16년 전 조회 2,289
16년 전 조회 1,403
16년 전 조회 1,746
16년 전 조회 1,934
16년 전 조회 1,028
16년 전 조회 1,710
16년 전 조회 1,422
16년 전 조회 1,918
16년 전 조회 1,338
16년 전 조회 2,219
16년 전 조회 1,908
16년 전 조회 5,884
16년 전 조회 1,931
16년 전 조회 3,698
16년 전 조회 1,482
16년 전 조회 1,771
16년 전 조회 2,083
16년 전 조회 2,625