JSFiddle - React, Tailwind, and code Playground
by dandrade78
HTML
<p> Objective how to use onkeypress to filter input keys
<textarea name="ta" id="ta" rows="4" cols="50" onkeypress="if (isNaN( String.fromCharCode(event.keyCode) )) return false;>
only numbers and spaces and endlines
</textarea>