Exercise Set 2

Exercise 1 of 6

Watch the setting style video. Change the button's background color when it's clicked.


<button id="changeColorButton">Change background color</button>


var changeColorButton = document.getElementById("changeColorButton");

changeColorButton.addEventListener("click", changeColor);

function changeColor() {
    // your code will appear here

You must be signed in to type your code.

Last topic Next exercise