📜  es6 添加和删除类 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:16.285000             🧑  作者: Mango

代码示例1
let el = document.getElementById('container');

//remove class
el.classList.remove('first');

//remove class
el.classList.add('first');