Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

html input regex only numbers

<!--The tag below uses a regex-->
<input type="text" pattern="[0-9]*" />

<!--The same effect can be achieved by using type number tag-->
<input type="number" />
 
PREVIOUS NEXT
Tagged: #html #input #regex #numbers
ADD COMMENT
Topic
Name
2+2 =