Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets or retrieves the maximum number of characters that the user can enter in a text control.
![]() ![]() |
Syntax
HRESULT value = object.put_maxLength( v);HRESULT value = object.get_maxLength(* p);
Property values
Type: long
The maximum length of the input.
Standards information
- Document Object Model (DOM) Level 1 Specification, Section 2.5.5
- HTML 4.01 Specification, Section 17.4
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.7.3.8
Remarks
The IHTMLInputElement::maxLength property limits the number of characters the user can enter. The property does not limit programmatic assignments to the IHTMLInputElement::value property. The property's value can be larger than the IHTMLInputElement::size of the text box, in which case the text box scrolls as the user types.
.png)
.png)