通过标签获取元素: var aLi = document.getElementsByTagName('Li'); aLi[0].style.backgroundColor = 'gold'; 选中部分li操作: var oList = document.getElementById('list01'); var aLi = oList.getElementByTagName('li'); alert(aLi.length); for循环: var oList = document.getElem