Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

input number maxlength

<form method="post">
      <label for="myNumber">My Number:</label>
      <input type="number" maxlength="9" required
      oninput="javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);" >
     <br><br>
      <input type="submit" value="Submit">
</form>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #input #number #maxlength
ADD COMMENT
Topic
Name
6+1 =