When designing the front-end form, we need to set the longest character length of the form input. Input is used here to control.
1. Input maxlength attribute
The maxlength attribute of input can limit the length of input content.
Here, number is used to limit.
2. The method of input input length limitation
<input type="text" name="" maxlength="20" id="">
Here, we can set the longest character 20, and we can adjust the value.
Scan the code to follow the official account
Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge