Click to return to the DHTML, HTML     
MARGINWIDTH Attribute | m...     MEDIA Attribute | media P...     DHTML Properties    
Web Workshop  |  DHTML, HTML & CSS

MAXLENGTH Attribute | maxLength Property


Sets or retrieves the maximum number of characters that the user can enter into a text control.

Syntax

HTML<INPUT TYPE="text" MAXLENGTH = iLength ... >
Scriptingobject.maxLength [ = iLength ]

Possible Values

iLengthInteger 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

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
INPUT type=text, INPUT type=password

See Also

size



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.