maxLength
< html | attributes
maxLength
This page has been flagged with the following issues:
High-level issues:
Needs Summary: This article does not have a summary. Summaries give a brief overview of the topic and are automatically included on some listing pages that link to this article.
| Applies to | ? |
|---|
Examples
HTML
<form action="demo_form.asp"> Username: <input type="text" name="usrname" maxlength="10">
<input type="submit" value="Submit"> </form>
Notes
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 the user types.
Syntax
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
Compatibility
Desktop
| Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|
| Basic support | ? | ? | ? | ? | ? |
Mobile
| Feature | Android | BlackBerry | Chrome for mobile | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Opera Mini | Safari Mobile |
|---|---|---|---|---|---|---|---|---|
| Basic Support | ? | ? | ? | ? | 9 | ? | ? | ? |
See also
Related pages (MSDN)
input type=textinput type=passwordHTMLInputElementHTMLTextAreaElementsize
This article contains content originally from external sources.
Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]
This tool helps to make and review comments inline.
How to Use
insert instructions, with images, here