Javascript examples for DOM HTML Element:Textarea
Textarea rows Property - Get the height of a text area, in characters:
<!DOCTYPE html> <html> <body> <textarea id="myTextarea" rows="4" cols="50"> new value//w w w . j av a2 s. c o m </textarea> <button type="button" onclick="myFunction()">Test</button> <script> function myFunction() { var v = document.getElementById("myTextarea").rows; console.log(v); } </script> </body> </html>