Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Avoid letters in number inputs
$(document).ready(function(){
//cuando se intenten meter letras en un campo de precio
$('.cantidad_producto').keypress(function(e){
if( e.which!=8 && e.which!=0 && (e.which<48 || e.which>57)){
return false;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.