리자

Automatically Jumping To The Next Field

· 20년 전 · 2777
var downStrokeField;
function autojump(fieldName,nextFieldName,fakeMaxLength)
{
var myForm=document.forms[document.forms.length - 1];
var myField=myForm.elements[fieldName];
myField.nextField=myForm.elements[nextFieldName];

if (myField.maxLength == null)
myField.maxLength=fakeMaxLength;

myField.onkeydown=autojump_keyDown;
myField.onkeyup=autojump_keyUp;
}

function autojump_keyDown()
{
this.beforeLength=this.value.length;
downStrokeField=this;
}

function autojump_keyUp()
{
if (
(this == downStrokeField) &&
(this.value.length > this.beforeLength) &&
(this.value.length >= this.maxLength)
)
{
if (this.nextField.select) this.nextField.select();
this.nextField.focus();
}
downStrokeField=null;
}<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:16:08 PHP & HTML에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다. 로그인

개발자팁

개발과 관련된 유용한 정보를 공유하세요. 질문은 QA에서 해주시기 바랍니다.

+
분류 제목 글쓴이 날짜 조회
기타 20년 전 조회 4,421
기타 20년 전 조회 4,853
기타 20년 전 조회 6,438
JavaScript 20년 전 조회 8,224
Flash 20년 전 조회 5,163
기타 20년 전 조회 6,467
기타 20년 전 조회 5,024
JavaScript 20년 전 조회 5,404
기타
bbbking
20년 전 조회 1.2만
JavaScript 20년 전 조회 5,687
MySQL 20년 전 조회 5,740
기타 20년 전 조회 4,112
JavaScript 20년 전 조회 4,110
기타 20년 전 조회 3,515
기타 20년 전 조회 2,778
기타 20년 전 조회 3,654
MySQL 20년 전 조회 5,109
MySQL 20년 전 조회 5,775
MySQL 20년 전 조회 1.3만
MySQL 20년 전 조회 7,923
기타 20년 전 조회 5,894
기타 20년 전 조회 4,858
JavaScript 20년 전 조회 5,158
기타 20년 전 조회 3,483
PHP 20년 전 조회 4,678
PHP 20년 전 조회 4,667
PHP 20년 전 조회 4,084
기타 20년 전 조회 4,281
기타 20년 전 조회 4,169
JavaScript 20년 전 조회 5,716
🐛 버그신고