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


You need to login to view comments.