开发者

autoTab and allowed only numbers

is there any easy way of implementing two feature 1) auto tab and 2) allowed only numbers

i have a SSN box below as soon as the user enter three digits will skip to the next .. so on and so forth.....

    <TR>
    <TD nowrap><b>Social Security Number</b></TD>
    <TD align="left" nowrap colspan="4">
&开发者_如何学JAVAlt;INPUT NAME= "SSN1" TYPE= "TEXT" SIZE= "3" MAXLENGTH= "3" VALUE= "">
<INPUT NAME= "SSN2" TYPE= "TEXT" SIZE= "2" MAXLENGTH= "2" VALUE= "">
<INPUT NAME= "SSN3" TYPE= "TEXT" SIZE= "4" MAXLENGTH= "4" VALUE= "">
</TD>
    </tr>

also i wanted to restrict to have only numbers.


Since you are using jQuery, I recommend using a Mask Input plugin to accomplish what you are after:

This will use mask input:

  • http://digitalbush.com/projects/masked-input-plugin/

This will enable autotab:

  • http://www.mathachew.com/sandbox/jquery-autotab/
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜