title: How to change button colors upon click (Javascript)?
body: <p>I have two buttons. When one is clicked, I want it to turn from gray to black and stay black unless the page is refreshed <em>or</em> the other button is clicked. If the other button is clicked, I would like it to turn black and for the first one to go back to gray. I assume JS is the best way for this, but I'm not sure how to do it.</p>
  
  <p>Here is some of my code below:</p>
  
  <p>HTML:</p>
  
  <pre><code> &lt;a id="button"&gt;&lt;/a&gt;
   &lt;a id="button"&gt;&lt;/a&gt;
  </code></pre>
  
  <p>CSS:    </p>
  
  <pre><code>#button {
  display:inline-block;
      height:10px;
      width:10px;
      border-radius:10px;
      background-color:gray;
  }
  </code></pre>
  
  <p>Many thanks in advance.</p>