document.getElementById("yourID").readOnly = true;
document.getElementById("myText").readOnly = true;