JSFiddle - React, Tailwind, and code Playground

HTML

<table id="yearSectionAdd2Table">
   <thead>
      <tr id="columnHeader">
        <th>
           <div>
               <input id="moveToAnTable" type="button" value="&lt;&lt;">
           </div>
        </th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          <center>
             <input id="moveToAnTableOne" type="button" value="&lt;&lt;">
          </center>
        </td>
      </tr>
    </tbody>
</table>

JavaScript

$("#moveToAnTable").click(function(){
    var id = $(this).closest("table").find("tbody input").attr("id");
    alert(id);
    return false;
});