Edit This Code:
<!DOCTYPE html>
<html>
<body>

Address:<br>
<textarea id="myTextarea" readonly>
342 Alvin Road
Ducksburg</textarea>

<p>Click the button to find out whether the text area is read-only, or not.</p>

<button type="button" onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myTextarea").readOnly;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy