how to set field uneditable html code example Example: readonly attribute in html by javascript document.getElementById("yourID").readOnly = true;