You are here: Reference > JavaScript > client-side > HTML DOM > properties > isMultiLine

isMultiLine property

Browser support:
Returns a Boolean value that indicates whether the contents of an element can be multiline or not.


You can find the related objects in the Supported by objects section below.
This property is read-only.

Possible values:

Boolean that indicates whether there can be multiple lines in the element's contents.
One of the following values:
The element cannot contain multiline content.
The element can contain multiline content.
Default: this property has no default value.

Example HTML code 1:

This example illustrates the use of the isMultiLine property:
    <script type="text/javascript">
        function IsMultiline (elem) {
            var msg = (elem.isMultiLine == true)? "yes" : "no";
            alert (msg);
    <input type="text" id="myInput" value="Input"/>
    <button onclick="IsMultiline (myInput);">Can this field have multiple lines?</button>
    <br />

    <textarea id="myTArea">Textarea</textarea>
    <button onclick="IsMultiline (myTArea);">Can this field have multiple lines?</button>
Did you find this example helpful? yes no

Supported by objects:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content