Allow user to enter specific Characters in TextBox using JavaScript

Last Reply 9 days ago By EmadKhan

Posted 13 days ago

Allow only these characters in textbox and restrict other characters from being inserted 

Allow only
alphabets , numbers , left key, right key, backspace key, delete key, forward slash, round brackets (), ampersand, dot, dash, whitespaces 

other characters should be ignored.

You are viewing reply posted by: EmadKhan 9 days ago.
Posted 9 days ago

I found simplest solution :

https://github.com/johnantoni/jquery.alphanumeric

Please visit and download the above plugin :

Using above plugin we can use this jQuery coding to acheive the target:

$('.specialField').alphanumeric({ allow: "-()&/. " });

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html