-2

I have to set limit of input number limit so that user can type only 3 numbers. here my input tag:

           <input type="number" name="age" id="age" class="inPadd" maxlength="3">
Raghav Singh
  • 143
  • 1
  • 1
  • 13

1 Answers1

0

You should use attributes min="0" and max="999" instead of maxlength

 <input type="number" name="age" id="age" class="inPadd" min="0" max="999">
kiks73
  • 3,718
  • 3
  • 25
  • 52