Is there a way to restrict the input field to only accept numbers? I attempted to use type='number'
, but non-numeric values can still be entered. How can I prevent users from inputting non-numbers?
<input type="number" style="background-color:#f5f5f5;" class="form-control" placeholder="number">