# maxlength attribute

Type: | number
Inherited: | no
Used By: | input
See: | type

This attribute controls the maximum number of characters that can be entered in an input tag where type is equals to "text". It has the same function as the "maxlength" attribute in HTML.

The following form element would be limited to 10 characters.

    <input type="text" name="phonenumber" width="10em" maxlength="10"/>