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
精彩评论