<div id="progress" class="progress-bar "></div>怎么写一个方,判断是否存在class progress-100,没有就添加,有就删除,
<div id="progress" class="progress-bar "></div>
let dom = document.querySelector('#progress'); // 或者 let dom = document.getElementById('progress'); dom.classList.toggle('progress-100');
1.4m articles
1.4m replys
5 comments
57.0k users