엔터치면 다음칸으로 이동.
<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년 전
.
게시판 목록
퍼블리셔팁
퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 197 | JavaScript | 18년 전 | 5211 | ||
| 196 | HTML | 18년 전 | 3806 | ||
| 195 | 기타 |
|
18년 전 | 6286 | |
| 194 | HTML | 18년 전 | 4097 | ||
| 193 | HTML | 18년 전 | 4919 | ||
| 192 | HTML | 18년 전 | 3935 | ||
| 191 | HTML | 18년 전 | 4472 | ||
| 190 | HTML | 18년 전 | 7323 | ||
| 189 | HTML | 18년 전 | 2871 | ||
| 188 | HTML | 18년 전 | 3374 | ||
| 187 | HTML | 18년 전 | 3300 | ||
| 186 | HTML | 18년 전 | 2975 | ||
| 185 | HTML | 18년 전 | 5463 | ||
| 184 | HTML | 18년 전 | 3359 | ||
| 183 | HTML | 18년 전 | 5337 | ||
| 182 | JavaScript | 18년 전 | 4039 | ||
| 181 | HTML | 18년 전 | 3110 | ||
| 180 | HTML | 18년 전 | 3151 | ||
| 179 | HTML | 18년 전 | 3165 | ||
| 178 | HTML | 18년 전 | 3261 | ||
| 177 | HTML | 18년 전 | 3189 | ||
| 176 | HTML | 18년 전 | 4432 | ||
| 175 | HTML | 18년 전 | 3007 | ||
| 174 | HTML | 18년 전 | 3036 | ||
| 173 | HTML | 18년 전 | 3048 | ||
| 172 | HTML | 18년 전 | 3461 | ||
| 171 | HTML | 18년 전 | 4104 | ||
| 170 | HTML | 18년 전 | 3209 | ||
| 169 | HTML | 18년 전 | 3403 | ||
| 168 | HTML | 18년 전 | 3209 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기