Я использую JavaScript, и я хочу добавить/удалить атрибут Class, если нажата кнопка. Я могу добавить класс, но я не знаю, как его удалить. как я могу это сделать?
window.onload = function(){
var buttonGo = document.getElementsByTagName('button')[0];
var buttonCom = document.getElementsByTagName('button')[1];
var box = document.getElementById('box');
buttonGo.onclick = function(){
box.setAttribute('class','move');
}
buttonCom.onclick = function(){
// how to remove class name?
}
}