I want to change color of a specific area when clicked on a button. But get change the whole background instead only h2 index 0.
btn = document.createElement("button");
btn.innerHTML = "L1";
btn.onclick = (changeColor) => {
changeTags = document.getElementsByTagName("h2");
c = changeTags[0];
console.log(c);
alert("This button is designated to Level 1 CM Approver Teams");
document.body.style.backgroundColor = "red";
}