how get element id in javascript code example
Example 1: get element by id in javascript
document.getElementById("YourElementId");
Example 2: javascript change element id
var element = document.getElementById("oldID");
element.id = "newID";
document.getElementById("YourElementId");
var element = document.getElementById("oldID");
element.id = "newID";