title: Trying to get class name from tr tag - 'undefined'
body: <p>I need to get the class name from a given <code>&lt;tr&gt;</code> tag, but am unable to do so.</p>
  
  <pre><code>&lt;table cellpadding=5 cellspacing=5&gt;
      &lt;tr id='cat_abc123' class='class_a'&gt;
          &lt;td&gt;foo&lt;/td&gt;
          &lt;td&gt;&lt;input type='checkbox' name='cb1' value='1' onClick="info(this, 'abc123')"&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
   &lt;script language='javascript'&gt;
       function info(theElement, id)
       {
           tr_id = 'cat_' + id;
           alert(tr_id + ' ' + document.getElementById(tr_id).class);
       }
   &lt;/script&gt;
  </code></pre>
  
  <p>Working example: 
  <a href="http://jsfiddle.net/rQpeu/" rel="nofollow">http://jsfiddle.net/rQpeu/</a></p>
  
  <p>What am I missing?</p>
  
  <p><strong>Update</strong></p>
  
  <p>I was using the wrong descriptor - should use Classname.  Thanks for the prompt responses everyone!  Updated jsfiddle: <a href="http://jsfiddle.net/rQpeu/3/" rel="nofollow">http://jsfiddle.net/rQpeu/3/</a> </p>