问题
How do I check with HTML5 if input is between 1-100?
<input type="numeric" name="count" pattern="[1-9]" />
回答1:
Using min
and max
.
<input type="number" name="count" min="1" max="100">
Note the type
is number
.
来源:https://stackoverflow.com/questions/13569365/html5-input-numeric-between-numbers