can assign to readonly property of object javascript code example Example: javascript set readonly property document.getElementById('InputFieldID').readOnly = true;