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

<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,755
16년 전 조회 3,609
16년 전 조회 4,446
16년 전 조회 3,111
16년 전 조회 2,357
16년 전 조회 2,447
16년 전 조회 2,690
16년 전 조회 2,180
16년 전 조회 5,518
16년 전 조회 3,373
16년 전 조회 1,366
16년 전 조회 1,708
16년 전 조회 5,080
16년 전 조회 2,319
16년 전 조회 3,419
16년 전 조회 2,656
16년 전 조회 1,572
16년 전 조회 5,365
16년 전 조회 2,481
16년 전 조회 5,973
16년 전 조회 1,950
16년 전 조회 4,022
16년 전 조회 3,041
16년 전 조회 2,225
16년 전 조회 2,244
16년 전 조회 4,409
16년 전 조회 3,307
16년 전 조회 2,841
16년 전 조회 2,981
16년 전 조회 2,098
16년 전 조회 1,779
16년 전 조회 1,692
16년 전 조회 1,413
16년 전 조회 1,684
16년 전 조회 1,914
16년 전 조회 1,608
16년 전 조회 4,850
16년 전 조회 3,837
16년 전 조회 1,802
16년 전 조회 1,547
16년 전 조회 2,287
16년 전 조회 4,524
16년 전 조회 3,557
16년 전 조회 2,590
16년 전 조회 4,347
16년 전 조회 3,212
16년 전 조회 1,365
16년 전 조회 1,384
16년 전 조회 2,045
16년 전 조회 1,892
16년 전 조회 2,574
16년 전 조회 2,240
16년 전 조회 1,379
16년 전 조회 4,394
16년 전 조회 1,489
16년 전 조회 1,792
16년 전 조회 2,217
16년 전 조회 3,851
16년 전 조회 2,745
16년 전 조회 1,503
16년 전 조회 4,024
16년 전 조회 1,404
16년 전 조회 1,588
16년 전 조회 1,255
16년 전 조회 1,729
16년 전 조회 1,629
16년 전 조회 1,641
16년 전 조회 1,433
16년 전 조회 2,188
16년 전 조회 1,827
16년 전 조회 1,982
16년 전 조회 2,192
16년 전 조회 1,479
16년 전 조회 2,315
16년 전 조회 2,265
16년 전 조회 4,541
16년 전 조회 1,306
16년 전 조회 1,059
16년 전 조회 2,017
16년 전 조회 1,989
16년 전 조회 1,521
16년 전 조회 2,048
16년 전 조회 2,284
16년 전 조회 1,400
16년 전 조회 1,742
16년 전 조회 1,929
16년 전 조회 1,022
16년 전 조회 1,704
16년 전 조회 1,415
16년 전 조회 1,916
16년 전 조회 1,333
16년 전 조회 2,215
16년 전 조회 1,902
16년 전 조회 5,879
16년 전 조회 1,927
16년 전 조회 3,693
16년 전 조회 1,477
16년 전 조회 1,764
16년 전 조회 2,079
16년 전 조회 2,621