Answer the question
In order to leave comments, you need to log in
How to make a field for entering numbers only?
I know that it can be written like this: <input type="number">
But with this method, arrows appear on the side , which terribly spoil the appearance. How can I make it so that they would not be, but at the same time it was possible to enter only numbers?
Answer the question
In order to leave comments, you need to log in
<input type="text" oninput="this.value = this.value.replace(/[^0-9]/g, '')">
You can use any mask input plugin (search for example "javascript mask"):
For example ,
This
or this
, etc., there are a lot of them available, for every taste and color :)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question