asp.net.ph

Skip Navigation LinksHome > Abakada: Back to Basics > Language References > HTML Element Attributes > MAXLENGTH Attribute

MAXLENGTH Attribute | maxLength Property


Sets or retrieves the maximum number of characters that can be entered into a text control.

Syntax

Inline <input type="text" MAXLENGTH = iLength...>
Script object.maxLength = iLength ]

Possible Values

iLength Integer value for the maximum length of the input.

The property is read/write with a default value of unlimited.

Remarks

This attribute specifies the maximum number of characters the user may enter. This number may exceed the specified size, in which case the text box scrolls as necessary.

The property limits the user entry, not programmatic assignments to the value property.

Applies To

INPUT type=text, INPUT type=password

See Also

size



Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note