【发布时间】:2022-01-15 13:04:10
【问题描述】:
我不知道为什么它返回 tagName 错误。子标签错了吗?
for (var ind = 0; ind < target.length; ind++)
{
var target = target[ind]
for (var ind; ind < target.childNodes.length; ind++);
{
const subLabel = target.childNodes[ind];
if (subLabel.tagName == "SPAN" || subLabel.tagName == "LI") //error line
{
//do something with label
}
typeDisplay(subLabel);
}
}
【问题讨论】:
标签: javascript html