how to get rid of class js code example Example: how to remove an class in javascript document.getElementsByClassName("legend").style.display="none";