Sets or retrieves the maximum number of characters that the user can enter into a text control.
Syntax
HTML <INPUT TYPE="text" MAXLENGTH = iLength ... > Scripting object.maxLength [ = iLength ]
Possible Values
iLength Integer that specifies the maximum length of the input. The property is read/write with a default of no limit.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see Dynamic Properties.
Remarks
The maxLength property limits the number of characters the user can enter. The property does not limit programmatic assignments to the value property. The property's value can be larger than the size of the text box, in which case the text box scrolls, as necessary, as the user types.
Applies To
INPUT type=text, INPUT type=password
See Also