title: How to find the parent element using javascript
body: <p>I want to change the background color of the table cell when radio button inside the cell is clicked.</p>
  
  <pre><code>&lt;table&gt;
    &lt;tr&gt;
      &lt;td align="center"&gt;  
        &lt;input type="radio" value="foo" 
          onclick="this.parentElement.style.background-color='red';" /&gt;
       &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>How to get the parent element reference?</p>