javascript change element tag code example
Example 1: javascript change element id
var element = document.getElementById("oldID");
element.id = "newID";
Example 2: how to change html element in javascript
document.getElementbyid.innerHTML = "text";