No letters - only digits as input


/ Published in: JavaScript
Save to your folder(s)

useful if you only want digits as input


Copy this code and paste it in your HTML
  1. <input type="text" onkeyup="this.value = this.value.replace (/\D+/, '')" name="quantity" value="1" >

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.