且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

检查值是否在两个数字之间

更新时间:2022-11-01 13:14:36

尝试使用正则表达式限制特殊字符的链接

http://jsfiddle.net/anomepani/o1fpybgd/4/ [ ^ ]



或使用下面的链接查看限制字符使用密钥代码

http://***.com/questions/950208/textbox-with-alphanumeric-check-in- javascript [ ^ ]


检查下面的代码,它只接受字母数字charcater



 


' input')。bind(' keypress',function( event ){
var regex = new RegExp( ^ [A-ZA-Z0-9\b] +

Hi!

Can someone give me a syntax of something that will help me validate if a number is in between two values?

1st condition - between 48 and 57.
2nd condition - between 65 and 90.
3rd condition - between 96 and 105.

Or a javascript that will validate if input text in textbox is Alpha-numeric only.

Note: The numbers are Character Codes used in Javascript.

Thank you so much and God bless. :)

Try this link for restrict special character using regex
http://jsfiddle.net/anomepani/o1fpybgd/4/[^]

or refer this below link for restrict character using keycode
http://***.com/questions/950208/textbox-with-alphanumeric-check-in-javascript[^]


Check the below code which accept only alpha numeric charcater



('input').bind('keypress', function (event) { var regex = new RegExp("^[a-zA-Z0-9\b]+