javascript make input readonly 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;