February 2014
Intermediate to advanced
410 pages
8h 15m
English
It is possible to limit the characters a user is able to input into a text field by utilizing jQuery's keypress events. In some situations, this can be a powerful user experience feature, as the user is visually aware of the characters that they cannot provide instead of having to wait for a response from the server informing them of this error.
Once again, we are going to need a blank HTML document with the latest version of jQuery to work through this recipe. Create recipe-6.html and ensure that you have jQuery downloaded and ready to go.
Learn how to restrict a user from entering certain characters into a text input using jQuery by performing the following steps:
Read now
Unlock full access