[java] 스크립트 – 주민등록번호 자동 넘기기
======= 해드문 ==========
<SCRIPT LANGUAGE=”JavaScript” TYPE=”text/javascript”>
function autotab(thisval,fname, flen){
var fieldname = eval(“document.member.” + fname);
if(thisval != 9 && thisval != 16){
if(fieldname.value.length + 1 <= flen){
fieldname.focus();
}else{
for(x=0; x<document.member.elements.length; x++){
if(fieldname.name == document.member.elements[x].name){
var nextfield = x + 1;
}
}
document.member.elements[nextfield].focus();
}
}
}
</SCRIPT>
그리고 input 문에 들어가는 거
여기서 form namme은 위에 꺼랑 같아야 한답니다. (물론 잘 알고 있겠지 ^^)
<input type=”text” name=”jumin1″ size=”7″ maxlength=”6″ onkeyup=”autotab(event.keyCode,this.name,6)”> – <input type=”text” name=”jumin2″ size=”8″ maxlength=”7″ onkeyup=”autotab(event.keyCode,this.name,7)”>
6 Responses
3chauffeur
2underlying
… [Trackback]
[…] Read More Info here to that Topic: nblog.syszone.co.kr/archives/818 […]
… [Trackback]
[…] Info on that Topic: nblog.syszone.co.kr/archives/818 […]
… [Trackback]
[…] Find More on to that Topic: nblog.syszone.co.kr/archives/818 […]
… [Trackback]
[…] There you can find 78462 additional Info to that Topic: nblog.syszone.co.kr/archives/818 […]