how to remove a class button in javascript code example Example: how to remove an class in javascript document.getElementsByClassName("legend").style.display="none";