javascript set readonly property
snippet in javascript

javascript set readonly property

user8826

document.getElementById('InputFieldID').readOnly = true;