javascript input readonly change code example Example: readonly attribute in html by javascript Click to copydocument.getElementById("yourID").readOnly = true;