title: How to get the data from a html table with multiple inputs
body: <p>I have a page containing this table which comes from a PHP script.</p>
  
  <p><img src="https://i.stack.imgur.com/IYcWD.png" alt="enter image description here"></p>
  
  <p>What I want to to do? I want to fetch every value inside these 4 inputs, separately and save them inside 4 Javascript variables. I already have the <code>onclick="fetchGrades();</code> on every button.</p>
  
  <p>How can I achieve this? It's the <strong>last</strong> thing I need to do on this project.</p>
  
  <p>Also, I'm using all these technologies: PHP, MySQL, jQuery, Bootstrap, AJAX</p>
  
  <p><strong>As requested, the HTML of the current table:</strong></p>
  
  <pre><code>&lt;table class="table table-striped"&gt;
      &lt;thead&gt;
          &lt;tr&gt;
          &lt;th&gt;61&lt;/th&gt;
          &lt;th&gt;1º &lt;/th&gt;
          &lt;th&gt;2º &lt;/th&gt;
          &lt;th&gt;3º &lt;/th&gt;
          &lt;th&gt;4º &lt;/th&gt;
          &lt;th&gt; Botão &lt;/th&gt;
          &lt;/tr&gt;
      &lt;/thead&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td&gt;Patrick Maia&lt;/td&gt;
              &lt;td&gt;&lt;input id="e12467" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="e12467" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="e12467" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="e12467" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;button class="btn btn-primary" onclick="fetchGrades();"&gt; Adicionar &lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
  
          &lt;tr&gt;
              &lt;td&gt;Rodrigo Marques&lt;/td&gt;
              &lt;td&gt;&lt;input id="46c9ac" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="46c9ac" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="46c9ac" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;input id="46c9ac" type="text"&gt; &lt;/td&gt;
              &lt;td&gt;&lt;button class="btn btn-primary" onclick="fetchGrades();"&gt; Adicionar &lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>The ID's inside every input comes from a field on the MySQL they come from.</strong></p>