title: Return background color of clicked element js
body: <p>I want to send the background color of an element to a function using javascript for example:</p>
  
  <pre><code>&lt;td style="background-color:#ff0000" onClick="getColor()"&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Could anyone please give me a pointer as to what I have to do in the getColor() function?</p>