Set a text field to read-only in javascript


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