douhutongvm382381 2014-07-03 02:53
浏览 17

使用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:

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
    • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
    • ¥15 cmd cl 0x000007b
    • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
    • ¥500 火焰左右视图、视差(基于双目相机)
    • ¥100 set_link_state
    • ¥15 虚幻5 UE美术毛发渲染
    • ¥15 CVRP 图论 物流运输优化
    • ¥15 Tableau online 嵌入ppt失败
    • ¥100 支付宝网页转账系统不识别账号