原生js 实现addclass和removeclass

function getElementsByClassName(className,root,tagName) { //root:父节点,tagName:该节点的标签名。 这两个参数都可有可无 if(root){ root=typeof root=="string" ? document.getElementById(root) : root; }else{ r
相关文章
相关标签/搜索