使用js获取jQuery可选id值

I have table with five different <tr class="selectable" id="1"> with id values 1 to 5.

<table>
    <tr class="selectable" id="1">
      <td class="notselectable"><b>Minor</b></td>
      <td>1</td>
      <td>2</td>
      <td>3</td>
      <td>4</td>
     </tr>    
    <tr class="selectable" id="2">
     <td class="notselectable"><b>major</b></td>
     <td>1</td>
     <td>2</td>
     <td>3</td>
     <td>4</td>
    </tr>
</table>

.... up to 5 selectable where id = 3, 4, 5.

Now say if user select any element from to then get highest selected id values (say if they pick 5 and 4 then highest values 5 will be stored in db) and ignore other selected values.

$(function () {
    $(".selectable").selectable();
    $(".notselectable").selectable({ disabled: true });
});

Selecatable UI: