<script> /** getByClass **/ function getByClass(oParent, sClass){ var aEle = oParent.getElementsByTagName('*'); var re = new RegExp('//b' + sClass + '//b'); var aResult = []; for(var i = 0; i < aEle.length; i++){ if(re.test(aEle[i].className)){ aResult.push(aEle[i]); } } return aResult; } </script>