摘要:
输入:className:类名;root:父节点,在此节点下查找,string/node; tagName:找某一类标签function getElementsByClassName(className,root,tagName){ if(root){ root=typeof root=="string"?document.getElementById(root):root; }else{ root=document.body; } tagName=tagName||"*"; var els=root.getElementsByTagName(tagNa 阅读全文