I want to change an attribute using this:
document.getElementsByClassName('a').setAttribute("color","red")
but this does not work in Chrome. The console told me
setAttribute is not a function
Can you please tell me what javascript function to use? Thank you.