<INPUT maxLength=3 size=3 name="phone1" onKeyUp="JumpFocus(this,'phone2')"> -
<INPUT maxLength=3 size=3 name="phone2" onKeyUp="JumpFocus(this,'phone3')"> -
<INPUT maxLength=4 size=4 name="phone3" onKeyUp="JumpFocus(this,'sEmail')">
-------------javascript function-------------
function JumpFocus(currControl,nextControlName)
{
if(currControl.value.length == currControl.getAttribute("maxlength")) //jump focus to the next control
{
document.getElementById(nextControlName).focus();
}
}
Subscribe to:
Post Comments (Atom)
1 comment:
your didn't update your chinese blog for a while. I really think you can write so well.
继续吧?
Post a Comment