I have a number input field in HTML.
<input type="number" value="0">
and I’d like for the user to not be able to type more than five characters into the textbox.
I’ve used the maxlength
attribute before when the type is set to text
, but that doesn’t work with the number
attribute. Is there a relatively simple solution (inline HTML is preferred) to overcome this and limit the number of characters?
Thanks.