Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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"
 />
 
PREVIOUS NEXT
Tagged: #simple #text #field #accept #numbers #maximum #number #length #digit #min
ADD COMMENT
Topic
Name
4+9 =