jQuery中选中行

2021-04-08 14:25

阅读:713

标签:ted   edit   text   UNC   authorize   ble   pre   sre   col   

table id="tables" class="listTable">
                tr>
                    th class="check">
                        input type="checkbox" class="allCheck" />
                    th>
                   
                    th>
                        a href="#" hidefocus>xxa>
                    th>
                    th>
                        a href="#" hidefocus>xxa>
                    th>
                   
                   
                    th>
                        a href="#" hidefocus>xxa>
                    th>
                ...
                    th>
                        span>操作span>
                    th>
                tr>
                #list xx.xx as xx>
                    tr style="text-align:center">
                        td>
                            #if xx.xx>
                                input type="checkbox" name="xx" value="${xx.id}" disabled/>
                                #else>
                                input type="checkbox" name="xx" value="${xx.id}" />
                            #if>
                           
                        td>
                        td>td>
                        td>td>
                        td name="sex">td>
                        td name="phone">td>
                        td>td>
                        td>
                            
                        td>
                        td>td>
                        
                        td>td>
                        td>td>
                        td>
                            input type="checkbox" name="name" value="${name}"  hidden="hidden"/>
                            #if xx.xx>span  class="trueIcon"> span>#else>span class="falseIcon">span>#if>
                        td>
                        
                        td>
                            @sec.authorize ifAnyGranted="ROLE_DELIVERY_CENTER_EDIT">
                            a href="xx!xx.xx?id=${xx.id}" title="编辑">[编辑]a>
                            @sec.authorize>
                        td>
                    tr>
                #list>
            table>

 

 

var isRecomms = [];
  
var Check = $("table input[type=checkbox]:checked");
Check.each(function () {
    var row = $(this).parent("td").parent("tr");//获取选中行
    isRecomms .push(row.find("[name=‘sex‘]").val());
    isRecomms .push(row.find("[name=‘phone‘]").html());
    isRecomms .push(row.find("[name=‘Name‘]").html());
});

 

jQuery中选中行

标签:ted   edit   text   UNC   authorize   ble   pre   sre   col   

原文地址:https://www.cnblogs.com/chentexi/p/12459707.html


评论


亲,登录后才可以留言!