Answers for "input type number restrict length"

1

simple way to make a text field to accept numbers only with maximum number of length 13 digit and min 10

<input name="phoneNumber"
    oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
    type = "number"
    maxlength = "10"
 />
Posted by: Guest on December-23-2020
0

how to limit input type max length

<input name="somename"
    oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);"
    type = "number"
    maxlength = "6"
 />
Posted by: Guest on April-30-2020

Code answers related to "input type number restrict length"

Browse Popular Code Answers by Language