JavaScript Reference/Javascript Properties/rows 2 — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 11:22, 26 мая 2010
"rows" Example
<source lang="javascript">
<html>
<body>
<textarea id="myText" rows="3" cols="15" onclick="ab();">
</textarea>
<button onclick="myText.cols=100;">Set width of Textarea to 100</button>
<button onclick="myText.rows=20;">Set height of Textarea to 20</button>
</body>
</html>
</source>
"rows" is applied to
<source lang="javascript">
+----------------+--------------------------------------------------------------+ | Applied_To |<textarea> | +----------------+--------------------------------------------------------------+
</source>
"rows" Syntax and Note
<source lang="javascript">
Note: Read and write property. Specifies the number of horizontal rows in the element.
Syntax:
document.getElementById("textareaID").rows = value document.all.textareaID.rows = value // IE only
</source>