엔터치면 다음칸으로 이동.
<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년 전
감사감사
16년 전
.
게시판 목록
퍼블리셔팁
퍼블리싱과 관련된 유용한 정보를 공유하세요.
질문은 상단의 QA에서 해주시기 바랍니다.
질문은 상단의 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 227 | HTML |
hwatta
|
18년 전 | 5450 | |
| 226 | HTML | 18년 전 | 3099 | ||
| 225 | HTML | 18년 전 | 3656 | ||
| 224 | HTML |
mixdesign
|
18년 전 | 3953 | |
| 223 | HTML |
mixdesign
|
18년 전 | 5010 | |
| 222 | HTML | 18년 전 | 3137 | ||
| 221 | HTML | 18년 전 | 2993 | ||
| 220 | HTML |
|
18년 전 | 5130 | |
| 219 | HTML | 18년 전 | 4147 | ||
| 218 | HTML | 18년 전 | 5409 | ||
| 217 | HTML | 18년 전 | 2943 | ||
| 216 | HTML | 18년 전 | 3080 | ||
| 215 | HTML | 18년 전 | 3741 | ||
| 214 | HTML | 18년 전 | 3320 | ||
| 213 | HTML | 18년 전 | 2874 | ||
| 212 | HTML | 18년 전 | 4428 | ||
| 211 | HTML | 18년 전 | 3808 | ||
| 210 | HTML | 18년 전 | 3363 | ||
| 209 | HTML | 18년 전 | 3376 | ||
| 208 | HTML | 18년 전 | 2914 | ||
| 207 | HTML | 18년 전 | 4768 | ||
| 206 | HTML | 18년 전 | 4920 | ||
| 205 | HTML | 18년 전 | 4896 | ||
| 204 | HTML | 18년 전 | 5341 | ||
| 203 | HTML |
|
18년 전 | 4689 | |
| 202 | HTML | 18년 전 | 4742 | ||
| 201 | HTML | 18년 전 | 4238 | ||
| 200 | HTML | 18년 전 | 4928 | ||
| 199 | HTML | 18년 전 | 5550 | ||
| 198 | HTML | 18년 전 | 4093 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기