使用jQuery在文本框中键入SSN时自动插入连字符(-) [英] Insert hyphen(-) automatically while typing an SSN in a Textbox using jQuery

查看:67
本文介绍了使用jQuery在文本框中键入SSN时自动插入连字符(-)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个应用程序,其中用户必须在文本框中输入SSN.是否可以像在3(即123-)之后键入123连字符一样自动插入连字符(-).以相同的方式在5(即123-45-)之后输入123-45连字符.最后123-45-6789.如果输入错误,我必须能够更改号码.

Hi I am building an application where user have to enter SSN into a textbox. Is it possible to insert hyphen(-) automatically like while typing 123 hyphen after 3 i.e 123-. In the same way after typing 123-45 hyphen after 5 i.e 123-45-. Finally 123-45-6789 . I must be able to change number if entered wrongly.

推荐答案

我认为这可以提供帮助

屏蔽的输入插件

这篇关于使用jQuery在文本框中键入SSN时自动插入连字符(-)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆