1. js sets the readOnly attribute for <input>
<textarea name="content" id="content" cols="27" rows="6"></textarea>
var cObj = document.getElementById("content");
cObj.setAttribute("readOnly",'true');
2. Remove the <input>readOnly attribute from js
var cObj = document.getElementById("content");
cObj.removeAttribute("readOnly");
Note: Be sure to pay attention to the case of readOnly! ! !