document get element by class style code example
Example 1: how to get element by class name javascript
document.getElementsByClassName("legend").style.display="none";
Example 2: javascript document object model getElementsByClassName
document.getElementsByClassName('test')