Javascript examples for DOM HTML Element:Textarea
Textarea disabled Property - Find out if a text area is disabled, or not:
<!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> Main Street/* w ww . j a v 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; var v = document.getElementById("myTextarea").disabled; console.log(v); } function enableTxt() { document.getElementById("myTextarea").disabled = false; var v = document.getElementById("myTextarea").disabled; console.log(v); } </script> </body> </html>