How can I modify/update elements with unique class name in JavaScript?
The following code is not working:
document.getElementsByClassName("test").style.backgroundColor = "blue";
HTML markup:
<div class="test"></div>
<div class="test"></div>
<div class="test"></div>