Retrieves the value indicating whether the content of the object contains one or more lines.
Syntax
| JavaScript | |
|---|
Property values
Type: Boolean
false (false)
-
The content contains exactly one line.
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.
<html>
<head>
<script type="text/javascript">
function answer(arg) {
arg ? console.log("Yes") : console.log("No");
}
</script>
</head>
<body>
<p>Input: <input id="oInput" type="text" 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>
See also
- defaults
- a
- abbr
- address
- area
- b
- base
- bdo
- blockQuote
- body
- br
- button
- caption
- cite
- code
- col
- colGroup
- comment
- custom
- dd
- del
- div
- dl
- dt
- em
- embed
- fieldSet
- form
- head
- hn
- hr
- html
- i
- iframe
- img
- input type=button
- input type=checkbox
- input type=file
- input type=hidden
- input type=image
- input type=password
- input type=radio
- input type=reset
- input type=submit
- input type=text
- ins
- kbd
- label
- legend
- li
- link
- map
- object
- ol
- option
- p
- pre
- q
- rt
- ruby
- s
- samp
- script
- select
- small
- span
- strong
- sub
- sup
- table
- tBody
- td
- textArea
- tFoot
- th
- tHead
- title
- tr
- u
- ul
- var
Build date: 11/28/2012