Javascript examples for DOM HTML Element:Textarea
Textarea cols Property - Change the width and height of a text area using the cols and rows properties:
<!DOCTYPE html> <html> <body> <textarea id="myTextarea"> new value//from w w w . j a va 2 s. c o m </textarea> <button type="button" onclick="myFunction()">Test</button> <script> function myFunction() { document.getElementById("myTextarea").style.height = "100px"; document.getElementById("myTextarea").style.width = "500px"; } </script> </body> </html>