css change elements with same class name code example Example: getelementbyclass var selector = document.getElementsByClassName('class-name');