To change the value of an HTML attribute, use this syntax: document.getElementById(id).attribute = new value; to set the value: document.getElementById("id").value = "New Value Text";