增加:document.querySelector('.choice-answer .active').classList.add( "active-other");
去除:document.querySelector('.choice-answer .active').classList.remove("active-other");
替换:document.querySelector('.choice-answer .active').classList.replace("active","active-other");
用原生dom增加删除替换class
最新推荐文章于 2024-10-10 09:56:47 发布