HTMLTextAreaElement: rows property - Web APIs | MDN
Value
A positive integer. Defaults to 2.
Examples
js
const textareaElement = document.getElementById("comment");
const textLines = textArea.rows;
textArea.rows = textLines + 2;
Specifications
| Specification |
|---|
| HTML # dom-textarea-rows |
Browser compatibility
See also
<textarea>HTMLTextAreaElement.colsHTMLTextAreaElement.wrap- CSS
resizeproperty