📜  .children javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.788000             🧑  作者: Mango

代码示例1
const myElement = document.getElementById('foo');
for (let i = 0; i < myElement.children.length; i++) {
  console.log(myElement.children[i].tagName);
} // Logs the name of all the children.