How to display his result while typing in a field code example
Example: How to display his result while typing in a field
$(document).ready(function() {
$('#name').on('keypress', function(key) {
if((key.charCode < 97 || key.charCode > 122) && (key.charCode < 65 || key.charCode > 90) && (key.charCode != 45)) {
return false;
}
});
$('#phone').on('keypress', function(key) {
if(key.charCode < 48 || key.charCode > 57) {
return false;
}
});
});