Change background color using event handler
<p>I'm trying to create a simple form where I have three divs stacked on top of one another. When each box is clicked, their colors need to change (one red, one green, and one blue). I need to do this using only one event handler. I am stuck on my code, I'm hoping one of you can guide me through this. I would really appreciate it! Here is my code:</p>

<p>HTML:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Color Changer&lt;/title&gt;
    &lt;link rel="stylesheet" type="text/css" href="css/style.css"&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id="squareOne" class="listener"&gt;&lt;/div&gt;
    &lt;div id="squareTwo" class="listener"&gt;&lt;/div&gt;
    &lt;div id="squareThree" class="listener"&gt;&lt;/div&gt;

    &lt;script src="js/main.js"&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>JS:</p>

<pre><code>document.getElementById('squareOne').onclick = changeColor;

function changeColor() {
    document.body.style.color = "red";
    return false;
}
</code></pre>

<p>CSS:</p>

<pre><code>#squareOne {
    width: 200px;
    height: 200px;
    margin: 5px;
    background-color: #ccc;
}

#squareTwo {
    width: 200px;
    height: 200px;
    margin: 5px;
    background-color: #ccc;
}

#squareThree {
    width: 200px;
    height: 200px;
    margin: 5px;
    background-color: #ccc;
}
</code></pre>