I am trying to use javaScript to change the background colour of my class which is called row, My javascript and html code is listed below but its not working and im not sure what the problem is, any help would be greatly appreciated.
function changeColour() {
var row = document.getElementsByClassName("row");
row.style.backgroundColor="black";
}
My html code for the button is listed below.
<input type="button" id="btnColour" value="Change Colour"
onclick="changeColour();" />