JSFiddle - React, Tailwind, and code Playground
by ebiewener
HTML
<input type="text" />
JavaScript
$('input').keypress(function(e){
if(!(e.which >= 48 && e.which <=58)){
return false;
}
});
by ebiewener
<input type="text" />
$('input').keypress(function(e){
if(!(e.which >= 48 && e.which <=58)){
return false;
}
});