html5 input take only positive numbers code example
Example: 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