This page is In Progress

Notice: The WebPlatform project, supported by various stewards between 2012 and 2015, has been discontinued. This site is now available on github.

isMultiLine

Property of dom/HTMLElementdom/HTMLElement

Syntax

var result = element.isMultiLine;
element.isMultiLine = value;

Examples

The following example shows how to use the isMultiLine property to determine whether the content of an object can contain only one line or multiple lines of text.

<HTML>
<HEAD>
<SCRIPT>
function answer(arg) {
    arg ? alert("Yes") : alert("No");
}
</SCRIPT>
</HEAD>
<BODY>
<P>INPUT: <INPUT type="text" ID="oInput" VALUE="oInput"/>
<BUTTON onclick="answer(oInput.isMultiLine);">
Can the INPUT contain more than one line?</BUTTON>
</P>

<P>TEXTAREA: <TEXTAREA ID="oTextarea">oTextarea</TEXTAREA>
<BUTTON onclick="answer(oTextarea.isMultiLine);">
Can the TEXTAREA contain more than one line?</BUTTON>
</P>
</BODY>
</HTML>

View live example

Syntax

Attributions