Focus on cloud service provider activities
Notes on website operation and maintenance

Set the input number limit input length method

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.

 <input maxlength="number">

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.

Like( two )
Do not reprint without permission: Lao Zuo's Notes » Set the input number limit input length method

Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge