Maxlength attribute not working in number input type (Chrome)
The maxlength attribute is not working with <input type="number">. This happens only in Chrome.
Solution:
<input onkeypress="if(this.value.length==6) return false;" type="number" />
Demo:
Comments
Post a Comment