您的位置:首页 > Web前端 > JQuery

jquery 找到table中某一个表格的值

2018-01-17 17:05 106 查看

<table id="table" class="table table-striped table-hover">
<thead>
<tr>
<th>AppID</th>
<th>应用名称</th>
<!--<th>APP唯一标示</th>
<th>app_spell</th>-->
<th>包名</th>
<!--<th>开发者ID</th>-->
<th>开发者名称</th>
<th>应用大类型</th>
<th>应用小类型</th>
<th>应用简介</th>
<th>版本号</th>
<!--<th>versioncode</th>-->
<!--<th>应用图标</th>-->
<!--<th>icon_type</th>-->
<!--<th>截图</th>-->
<!--<th>下载地址</th>-->
<th>应用大小</th>
<!--<th>prority</th>-->
<th>状态</th>
<th>备注信息</th>
<!--<th>标签</th>
<th>star</th>
<th>orientation</th>-->
<th>更新时间</th>
<th>创建时间</th>
<th class="table-manage">管理</th>
<th class="table-manage">频道应用</th>
</tr>
</thead>
<tbody id="pageContent"></tbody>
<tfoot>
<tr>
<td colspan="6">
<div id="pagination" class="pagination"></div>
</td>
</tr>
</tfoot>
</table>






<tr>

<td>xxxxxxx</td>


<td>xxxxxxx</td>

<td>xxxxxxx</td>

<td>xxxxxxx</td>

<td class="table-update">
<div class="showmore">
<a href="javascript:void(0);" class="table-edit-btn">审核</a>
</div>
</td>

</tr>


//编辑获取数据数据
$("#pageContent").on("click",".table-add-btn",function(){
var that = $(this).parent().parent().parent();     //找到table

$("#input-app-id").val(that.find("td").eq(0).text());
$("#input-app-name").val(that.find("td").eq(1).text());

$("#addTempl2-modal").modal("show");
});
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: