Disable and enable a text area:
<!DOCTYPE html> <html> <body> Address:<br> <textarea id="myTextarea"> PO 1234, Main Street U.S.A. New York</textarea> <br> <button onclick="disableTxt()">Disable text area</button> <button onclick="enableTxt()">enable text area</button> <script> function disableTxt() {/*from w w w . j a va 2 s . c o m*/ document.getElementById("myTextarea").disabled = true; } function enableTxt() { document.getElementById("myTextarea").disabled = false; } </script> </body> </html>