Answers for "how to set the max charecter lengt in input html"

6

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>
Posted by: Guest on March-11-2022
0

maximum length for input box

<input type="text" id="textbox" name="textbox" maxlength="50" />
Posted by: Guest on January-20-2022

Code answers related to "how to set the max charecter lengt in input html"

Browse Popular Code Answers by Language