function getByClass(oParent,sClass) { var aResult = []; var aEle = oParent.getElementsByTagName("*"); for(var i = 0 ; i < aEle.length;i++) { fi(aEle[i].className == sClass) { aResult.push(aEle[i]); } } return aResult; }
oParent 是父节点
function getByClass(oParent,sClass) { var aResult = []; var aEle = oParent.getElementsByTagName("*"); for(var i = 0 ; i < aEle.length;i++) { fi(aEle[i].className == sClass) { aResult.push(aEle[i]); } } return aResult; }
oParent 是父节点