方案一:先通过父元素的子元素找到含自己在内的“兄弟元素”,然后判断剔除自己。 function siblings(elem) { var a = []; var b = elem.parentNode.children; for(var i =0,i<b.leng……