基于JavaScript实现类名的添加与移除 方法1:使用className属性;方法2:使用classListAPI;//用于匹配类名存在与否functionreg(name){retur 添加与移除