JavaScript Reference/Javascript Properties/rows 2

Материал из Web эксперт
Перейти к: навигация, поиск

"rows" Example

    
<html>
<body>
<textarea id="myText" rows="3" cols="15" onclick="ab();">
</textarea>
<br>
<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>



"rows" is applied to

+----------------+--------------------------------------------------------------+
| Applied_To     |<textarea>                                                    |
+----------------+--------------------------------------------------------------+



"rows" Syntax and Note

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