title: How to grab HTML table content with javascript?
body: <p>I'm creating a Greasemonkey script which reads and stores information from a text-based game into a database to use in the future.</p>
  
  <p>What I want is to be able to read the user's stats and turn those stats into variables so that I can proceed with making the information useful.</p>
  
  <p>Here is the source code of the table which I want to grab the stats info from:</p>
  
  <pre><code>&lt;table width="100%"&gt;
  &lt;tr&gt;
  &lt;td width="50%" valign="top" style="padding-right: 25px;"&gt;
      &lt;table  class="table_lines" width="100%" cellspacing="0" cellpadding="6" border="0"&gt;
      &lt;tr&gt;
          &lt;th colspan="3"&gt;Military Effectiveness&lt;/th&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;b&gt;Strike Action&lt;/b&gt;&lt;/td&gt;
          &lt;td align="right"&gt;16,376,469,657&lt;/td&gt;
          &lt;td align="right"&gt;Ranked #443&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;b&gt;Defensive Action&lt;/b&gt;&lt;/td&gt;
          &lt;td align="right"&gt;4,016,716,436&lt;/td&gt;
          &lt;td align="right"&gt;Ranked #569&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;b&gt;Spy Rating&lt;/b&gt;&lt;/td&gt;
          &lt;td align="right"&gt;12,245,896&lt;/td&gt;
          &lt;td align="right"&gt;Ranked #1,204&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;b&gt;Sentry Rating&lt;/b&gt;&lt;/td&gt;
          &lt;td align="right"&gt;5,291,630,090&lt;/td&gt;
          &lt;td align="right"&gt;Ranked #831&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now as you can see the stats don't have identifying class IDs or anything, so I'm not sure how to do this. I only really use PHP, so JS is very new to me but it seems similar to PHP.</p>
  
  <p>Maybe something that says "After <code>&lt;td&gt;&lt;b&gt;Strike Action&lt;/b&gt;&lt;/td&gt;</code>, grab the first td value" and then put it as a variable?</p>
  
  <p>NOTE: Strike Action, Defensive Action, Spy Rating and Sentry Rating are the variables I need.</p>