原生js 實現addclass和removeclass

function getElementsByClassName(className,root,tagName) { //root:父節點,tagName:該節點的標籤名。 這兩個參數都可有可無 if(root){ root=typeof root=="string" ? document.getElementById(root) : root; }else{ r
相關文章
相關標籤/搜索