title: different answer like document.getElementById(a).style.backgroundColor=red
body: <p>I want to make a function that that changes background color of a button but for lots of buttons that only the button pressed changes color
  I tried using</p>
  <pre><code>document.getElementById(a).style.backgroundColor=red
  </code></pre>
  <p>but it only changed the first one with the id <code>a</code> cant give each one a different id because then I cant have a 1 function but 1 per button</p>
  <p>Is there a way to get the id of that button in <code>getelement…</code></p>
  <p>I tried <code>this</code> but I don't really know how it works.</p>