change read only flag javascript document.getelementbyid code example Example: javascript set readonly property document.getElementById('InputFieldID').readOnly = true;