min max number input code example
Example 1: html min max example input number
<input type="number" id="quantity" name="quantity" min="1" max="5">
Example 2: html restrict input to numbers
<input type="text" oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(\..*)\./g, '$1');" />