用JS添加和删除class类名

 

添加:节点.classList.add("类名");

 

删除:节点.classList.remove("类名");

 

原文地址:https://www.cnblogs.com/xuyan1/p/8485128.html