I really like the ability to limit the set of input characters in the input fields using a regular expression.
This functionality exists in Ext.JS, but this framework is somewhat heavyweight for most sites. Therefore, I drew a plugin for jQuery that performs the same functionality.
')
You can use it as in a procedural one:
$(selector).keyfilter(/[0-9]/); $(selector).keyfilter( function (c ) { return c != 'Z' ; });
* This source code was highlighted with Source Code Highlighter .
so in the markup style:
< input type ="text" class ="mask-email" />
* This source code was highlighted with Source Code Highlighter .
The plugin can be extended by connecting scripts with extensions for $ .fn.keyfilter.defaults.masks.