Javascript examples for DOM HTML Element:Textarea
Textarea disabled Property - Disable and enable a text area:
<!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> Main Street// w ww . jav a2 s .c o m New York</textarea> <br> <button onclick="disableTxt()">Disable text area</button> <button onclick="enableTxt()">Enable text area</button> <script> function disableTxt() { document.getElementById("myTextarea").disabled = true; } function enableTxt() { document.getElementById("myTextarea").disabled = false; } </script> </body> </html>