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

<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,964
16년 전 조회 3,839
16년 전 조회 4,678
16년 전 조회 3,324
16년 전 조회 2,562
16년 전 조회 2,657
16년 전 조회 2,897
16년 전 조회 2,404
16년 전 조회 5,782
16년 전 조회 3,593
16년 전 조회 1,584
16년 전 조회 1,928
16년 전 조회 5,294
16년 전 조회 2,546
16년 전 조회 3,626
16년 전 조회 2,896
16년 전 조회 1,768
16년 전 조회 5,608
16년 전 조회 2,726
16년 전 조회 6,193
16년 전 조회 2,151
16년 전 조회 4,225
16년 전 조회 3,253
16년 전 조회 2,437
16년 전 조회 2,448
16년 전 조회 4,613
16년 전 조회 3,510
16년 전 조회 3,048
16년 전 조회 3,180
16년 전 조회 2,306
16년 전 조회 1,979
16년 전 조회 1,896
16년 전 조회 1,603
16년 전 조회 1,901
16년 전 조회 2,117
16년 전 조회 1,811
16년 전 조회 5,054
16년 전 조회 4,073
16년 전 조회 1,999
16년 전 조회 1,762
16년 전 조회 2,482
16년 전 조회 4,762
16년 전 조회 3,757
16년 전 조회 2,796
16년 전 조회 4,533
16년 전 조회 3,404
16년 전 조회 1,562
16년 전 조회 1,583
16년 전 조회 2,243
16년 전 조회 2,094
16년 전 조회 2,825
16년 전 조회 2,435
16년 전 조회 1,564
16년 전 조회 4,611
16년 전 조회 1,693
16년 전 조회 1,994
16년 전 조회 2,415
16년 전 조회 4,084
16년 전 조회 2,974
16년 전 조회 1,690
16년 전 조회 4,263
16년 전 조회 1,599
16년 전 조회 1,775
16년 전 조회 1,453
16년 전 조회 1,918
16년 전 조회 1,830
16년 전 조회 1,832
16년 전 조회 1,616
16년 전 조회 2,379
16년 전 조회 2,004
16년 전 조회 2,175
16년 전 조회 2,398
16년 전 조회 1,672
16년 전 조회 2,555
16년 전 조회 2,442
16년 전 조회 4,740
16년 전 조회 1,510
16년 전 조회 1,254
16년 전 조회 2,206
16년 전 조회 2,175
16년 전 조회 1,718
16년 전 조회 2,284
16년 전 조회 2,489
16년 전 조회 1,594
16년 전 조회 1,952
16년 전 조회 2,125
16년 전 조회 1,207
16년 전 조회 1,922
16년 전 조회 1,602
16년 전 조회 2,102
16년 전 조회 1,521
16년 전 조회 2,427
16년 전 조회 2,092
16년 전 조회 6,112
16년 전 조회 2,111
16년 전 조회 3,894
16년 전 조회 1,651
16년 전 조회 1,947
16년 전 조회 2,288
16년 전 조회 2,814