标签:ntb result var ++ style turn function ret ==
function getByClass(oParent,sClass){ var aEle=oParent.getElementsByTagName(‘*‘); var aResult=[]; for(var i=0;i<aEle.length;i++){ if(aEle[i].className==sClass){ aResult.push(aEle[i]); } } return aResult; } var oDiv=document.getElementById(‘div1‘); var oBtnPrev=getByClass(oDiv,‘prev‘);
getElementsByClassName() IE9以下不兼容
标签:ntb result var ++ style turn function ret ==
原文地址:https://www.cnblogs.com/sunnywindycloudy/p/12995714.html