HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Textarea Object : Get the maximum number of characters allowed in a specific text area
The maxLength property sets or returns the value of the maxlength attribute of a text area.
The maxLength attribute specifies the maximum number of characters allowed in a text area.
Property | |||||
---|---|---|---|---|---|
maxLength | Yes | 10.0 | Yes | Yes | Yes |
Return the maxLength property:
Set the maxLength property:
Value | Description |
---|---|
number | Specifies the maximum number of characters allowed in the text area |
Return Value: | A Number, representing the maximum number of characters allowed in the text area |
---|
Change the maximum number of characters allowed in a text area:
document.getElementById("myTextarea").maxLength = "4";
HTML reference: HTML <textarea> maxlength attribute
❮ Textarea Object