开发者

jquery form validate

How can I input in the textbox and only accept numbers and symbols without use ma开发者_如何学Cskedinput?

eg : 12345-12


You might try this approach: How to allow only numeric (0-9) in HTML inputbox using jQuery?

Or perhaps: http://roshanbh.com.np/2008/04/textbox-accept-only-numbers-digits.html


use a validation library and tweak the regex so that it matches what you want. i like this library. :)


http://bassistance.de/jquery-plugins/jquery-plugin-validation/

http://docs.jquery.com/Plugins/validation

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜