/ Published in: JavaScript
useful if you only want digits as input
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<input type="text" onkeyup="this.value = this.value.replace (/\D+/, '')" name="quantity" value="1" >