엔터치면 다음칸으로 이동.
<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>
<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년 전
좋은소스감사합니다 !!!!
prokoko
16년 전
감사감사
15년 전
.
게시글 목록
| 번호 | 제목 |
|---|---|
| 21248 | |
| 13844 | |
| 529 | |
| 13842 | |
| 526 | |
| 29537 |
HTML
갈팡질팡
2
|
| 518 | |
| 502 | |
| 13840 | |
| 25293 | |
| 21244 | |
| 29532 |
HTML
블로그와 그누연동 가능할까요?
4
|
| 25288 | |
| 29531 |
HTML
안녕하세요..질문좀 드릴꼐요 ^^;
|
| 500 | |
| 13836 |
Flash
플래시버튼으로
3
|
| 21241 | |
| 495 | |
| 13832 |
JavaScript
제목에 한글 영문 숫자 와 공란만 입력하게 하고 싶습니다.
3
|
| 25283 | |
| 21236 | |
| 13830 | |
| 490 | |
| 21220 | |
| 21217 | |
| 25277 | |
| 25276 | |
| 25275 | |
| 484 | |
| 13827 | |
| 13825 | |
| 13819 |
JavaScript
[펌] 정규식 고수님들 ㅠㅠ... '차량번호' 정규식좀..
5
|
| 29529 | |
| 13813 | |
| 479 | |
| 21211 | |
| 25273 | |
| 478 | |
| 21201 | |
| 25272 | |
| 21189 | |
| 477 | |
| 476 | |
| 21185 | |
| 474 | |
| 21181 | |
| 21175 | |
| 472 | |
| 470 | |
| 469 | |
| 467 | |
| 465 | |
| 21168 | |
| 25267 | |
| 463 | |
| 21164 | |
| 21161 | |
| 458 | |
| 21146 | |
| 457 | |
| 13807 | |
| 454 | |
| 29528 | |
| 451 | |
| 447 | |
| 21127 | |
| 21122 | |
| 25262 | |
| 25254 | |
| 21119 | |
| 25251 | |
| 25243 | |
| 25239 |
기획서
웹기획서 작성process
3
|
| 21112 | |
| 442 | |
| 21103 | |
| 25233 | |
| 25222 | |
| 25230 | |
| 441 | |
| 21100 | |
| 25215 | |
| 21097 | |
| 21091 | |
| 25212 | |
| 25210 | |
| 25209 | |
| 21083 | |
| 21080 | |
| 439 | |
| 438 | |
| 436 | |
| 25200 | |
| 21066 | |
| 25195 | |
| 21055 | |
| 21051 | |
| 25192 | |
| 21040 | |
| 13803 |
기타
모바일사이트 시안.
3
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기