Answers for "how to select element by tag name in javascript"

7

document get element by tag

var list = document.getElementsByTagName("UL")[0];
list.getElementsByTagName("LI")[0].innerHTML = "Milk";
Posted by: Guest on June-12-2020
0

Finding HTML Elements by Tag Name

const element = document.getElementsByTagName("p");
Posted by: Guest on August-16-2021

Code answers related to "how to select element by tag name in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language