getByClass: function (oParent, sClass) {//class选择器 var aChild = oParent.getElementsByTagName('*'); var result= []; var re = new RegExp('\\b' + sClass + '\\b', 'i'); for (var i=0; i<aChild.length; i++) { if (re.test(sClass)) { result.push(aChild[i]); } } return result; }