Answers for "input positive numbers only"

1

input only positive values

<input type="number" min="0">
Posted by: Guest on April-11-2020
0

input positive numbers only

<input type="text" onkeypress="return (event.charCode == 8 || event.charCode == 0 || event.charCode == 13) ? null : event.charCode >= 48 && event.charCode <= 57" name="itemConsumption" />
                   ^------------....
//copy the onkeypress function :D
Posted by: Guest on April-19-2021

Code answers related to "input positive numbers only"

Browse Popular Code Answers by Language