js cant change element by id code example Example: javascript change element id var element = document.getElementById("oldID"); element.id = "newID";