let parent = children.parentNode; //获取直接父元素
获取兄弟元素
function getNextSibilingsNode(ele) {
let parsent = ele.parentNode;//获取元素父元素
let children = parsent.childNodes;
for (let i = 0; i < children.length; i++) {
if (children[i].nodeName == "SPAN" && children[i].className.indexOf("showname") != -1) {
return children[i];
}
}
return false;
}