readonly in javascript code example
Example 1: readonly attribute in html by javascript
document.getElementById("yourID").readOnly = true;
Example 2: javascript set readonly property
document.getElementById('InputFieldID').readOnly = true;
document.getElementById("yourID").readOnly = true;
document.getElementById('InputFieldID').readOnly = true;