엔터치면 다음칸으로 이동.
<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년 전
.
게시글 목록
| 번호 | 제목 |
|---|---|
| 1076 | |
| 1073 | |
| 1068 |
HTML
php 에서 xml 자유롭게 쓰기
4
|
| 1066 |
HTML
변수 함수 모음
|
| 1060 | |
| 1049 | |
| 1045 |
HTML
엔터치면 다음칸으로 이동.
3
현재글
|
| 1044 | |
| 1043 |
HTML
asp 목록보기
|
| 1041 | |
| 1039 | |
| 1038 |
HTML
테이블 복사
|
| 1037 | |
| 1036 | |
| 1035 |
HTML
레이어 좌표 이동-1
|
| 1034 |
HTML
프레임 제어속성
|
| 1033 | |
| 1032 |
HTML
prototype API
|
| 1028 | |
| 1025 | |
| 1021 | |
| 1018 | |
| 1016 | |
| 1015 |
HTML
글자수 제한시켜 짜르기
|
| 1014 |
HTML
레이어 스부적스부적 이동 스크립트
|
| 1012 | |
| 1010 | |
| 1008 |
HTML
[SQL]Update문
1
|
| 1007 |
HTML
[SQL]Insert 문
|
| 1006 |
HTML
[SQL]Table 만들기
|
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기