This topic has not yet been rated - Rate this topic

isMultiLine property

[This documentation is preliminary and is subject to change.]

Retrieves the value indicating whether the content of the object contains one or more lines.

Syntax

JavaScript

p = object.isMultiLine

Property values

Type: Boolean

VARIANT_FALSE (false)

The content contains exactly one line.

VARIANT_TRUE (true)

The content contains more than one line.

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.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/ismultilineEX1.htm



<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>



 

 

Build date: 3/8/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ