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