title: Javascript get inner HTML text for span by class name
body: <p>This is the basic format of the code the table is contained within a div named</p>
  
  <pre><code>&lt;div class="leftCol"&gt;    
  .....
  &lt;tr id="my_cd"&gt;
  &lt;td&gt;&lt;span class="agt_span"&gt;My Code&lt;/span&gt;&lt;/td&gt;
  &lt;/tr&gt;
  .....
  &lt;/div&gt;
  </code></pre>
  
  <p>I need to be able to get whatever text is contained within the span class, in this case I need to pull the text "My Code" and then add that into an array. Adding the text into an array is not the issue that's easy but I can't figure out how to pull the text. No matter what I try I can't get anything but an 'undefined' value.</p>
  
  <p>How do I get the Inner HTML text value for a span by class name?</p>
  
  <p><strong>First Question solved thanks!!</strong></p>
  
  <p>Second question expand on first: </p>
  
  <pre><code>&lt;div class="leftCol"&gt;    
  .....
  &lt;tr id="my_cd"&gt;
    &lt;td&gt;&lt;span class="agt_span"&gt;My Code&lt;/span&gt;&lt;/td&gt;
    &lt;td&gt;
      &lt;div&gt;
        &lt;select name="agt_drp" id="agt_drp" class="agt_drp"&gt;...&lt;/select&gt;
      &lt;/div&gt;
    &lt;/td&gt;
  &lt;/tr&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Let's say I have the select id "agt_drp" and I want to get the span class text. Is there any way to do that?</p>