In reference to this question: HTML Text Input allow only Numeric input
with one possible solution:
<input type="text" onkeypress='return event.charCode >= 48 && event.charCode <= 57'></input>
I wonder if it's also possible to have this solution (I'm looking for a one line statement, nothing else) adapted, such that it permits, besides for all integers, also for the delete key (and possibly backspace key) to be able to be pressed? So that a number which was inserted can be erased again.
Many thx!