Answers for "html input digits only"

-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

Browse Popular Code Answers by Language