JSFiddle - React, Tailwind, and code Playground

HTML

<table>
        <tr>
            <th>
                Student ID
            </th>           
        </tr>
       <tr>
            <td class="StudentInv">
                <input type="text" value="Test1" >
            </td>
            <td class="StudentInv">
                <input type="text" value="Test2" >
            </td>
            <td class="StudentInv">
                <input type="text"  value="Test3" >
            </td>
        </tr>
</table>

CSS

.StudentInv{}

JavaScript

$(document).ready(function() {
    
   var values = [];
   $(".StudentInv input").each(function(){
      values.push($(this).val());
   });

   console.log(values); // Values is populated here   
});