how to find an elements id in js code example
Example 1: javascript change element id
var element = document.getElementById("oldID");
element.id = "newID";
Example 2: Finding HTML Element by Id
var myElement = document.getElementById("intro");
var element = document.getElementById("oldID");
element.id = "newID";
var myElement = document.getElementById("intro");