亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

jquery獲取table中的某行全部td的內(nèi)容方法

 更新時間:2013年03月08日 15:20:37   作者:  
jquery獲取table中的某行全部td的內(nèi)容方法,需要的朋友可以參考一下

復(fù)制代碼 代碼如下:

<table>
<tr class="PurViewData" id="trid95">
    <td>14</td>
    <td id="95"><a style="color:#0000CC" href="/PurviewManage/AddPurview?id=95">TopParty優(yōu)惠</a></td>    

    <td>                  
        <select id="Select1"> 
        <option value="-1" selected="selected">請選擇角色</option>   
        <option  value='2'>系統(tǒng)管理員</option><option  value='3'>系統(tǒng)管理員2</option><option  value='6'>系統(tǒng)管理員3</option><option  value='23'>系統(tǒng)管理員4</option><option  value='26'>系統(tǒng)管理員5</option>
        </select>
    </td>       
    <td>
        <select id="Select2">                   
        <option value="-1" selected="selected">請選擇權(quán)限</option>                      
        <option  value='1'>搜索</option><option  value='2'>訪問</option><option  value='3'>創(chuàng)建</option><option  value='4'>修改</option>
        </select>
    </td>
    <td>
        <a  style="color:#0000CC" href="#" id="delecte95" onclick="Bind(this,this.id);">添加</a>
        <a  style="color:#0000CC" href="#" onclick="test1(this.id,this);">刪除</a>
    </td>
</tr>
   </table>   

<script>
function Bind(thisObj, thisObjID) {
    alert("Bind");
    var $td = $(thisObj).parents('tr').children('td');

 //    alert($td.eq(0).text()); //第一個td的內(nèi)容

//    alert($td.eq(1).text());//第二個td的內(nèi)容
//    alert($td.eq(2).find("select").val());//第三個td的內(nèi)容的selected的值
//    alert($td.eq(3).find("select").val());

    var resourceBlockID = $td.eq(1).attr("id");//第二個Td的ID的值,attr("id");獲取該對象的Id值
    var roleId = $td.eq(2).find("select").val();
    var operationId = $td.eq(3).find("select").val();
    alert("資源Id" + resourceBlockID);
    alert("角色I(xiàn)d" + roleId);
    alert("操作ID" + operationId);  

var helptime = new Date().getTime();
}
</script>

相關(guān)文章

最新評論