Answers for "input only accepts 4 digits"

-1

html input only 4 digits

<input type="text"  name="pincode" maxlength="4"  id="pin" pattern="^0[1-9]|[1-9]\d$" required/>
Posted by: Guest on June-04-2021
0

input digits only

<input type="text" 
       onkeyup="this.value=this.value.replace(/[^\d]/,'')">
Posted by: Guest on October-04-2021

Code answers related to "input only accepts 4 digits"

Browse Popular Code Answers by Language