Restricting input with jQuery
Restricting input with jQuery
$('.phoneInput').keypress(function(key) { if(key.charCode < 48 || key.charCode > 57) return false; });
>$('.surnameInput').keypress(function(key) { if((key.charCode < 97 || key.charCode > 122) && (key.charCode < 65 || key.charCode > 90) && (key.charCode != 45)) return false; });
Restricting input with jQuery
Reviewed by Bhaumik Patel
on
7:49 PM
Rating: