Answers for "html digit only input"

0

make only one digit input box

<input type="text" maxlength="1" oninput="this.value=this.value.replace(/[^0-9]/g,'');" />
Posted by: Guest on February-17-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