📅  最后修改于: 2022-03-11 15:01:29.553000             🧑  作者: Mango
var ul = document.getElementById("foo");
var items = ul.getElementsByTagName("li");
for (var i = 0; i < items.length; ++i) {
// do something with items[i], which is a element
}