jquery table表格 获取选中的某一行和某一列的值

table class="table table-hover" id="test123">
<tr>
<th width="45">选择</th>
<th width="100">驾校名称</th>
<th width="100">合作驾校名称</th>
<th width="100">申请时间</th>
<th width="100">申请状态</th>
<th width="100">操作</th>
</tr>
<tr>
<td><input type="checkbox" name="id" value="1" /></td>
<td>中大驾校</td>
<td>潇湘驾校</td>
<td>2016-04-15 14:40:20</td>
<td class="tablestate">未处理</td>
<td><a class="change button border-blue button-little update" href="#">修改申请状态</a></td>
</tr>
<tr>
<td><input type="checkbox" name="id" value="1" /></td>
<td>中大驾校</td>
<td>潇湘驾校</td>
<td>2016-04-15 14:40:20</td>
<td class="tablestate">未处理</td>
<td><a class="change button border-blue button-little update" href="#">修改申请状态</a></td>
</tr>
</table>

 

 

 

<div id="br_applicationStatus">
<span>修改申请状态</span>
<div class="radio" style="margin-top:1rem;"><input type="radio" name="br_radiobutton" value="未处理" checked="checked"> 未处理</div>
<div class="radio"><input type="radio" name="br_radiobutton" value="已处理"> 已处理</div>
<div class="radio"><input type="radio" name="br_radiobutton" value="无效"> 无效</div>
<div class="form-button br_confirm"><button class="button bg-main" type="submit" style="margin-left: 20%;margin-top: 1.5rem;">确认</button></div>
<div class="form-button br_cancel"><button class="button bg-main" type="submit" style="border: 1px solid #00BFFF;background-color: #fff;color: #00BFFF;position: relative;top:-2.2rem;margin-left: 62%;">取消</button></div>
</div>

 

 

 

 


这里写图片描述

 

 

具体的操作过程

$("#test123 tr").click(function(){
// 获取点中行的第五列
// alert($(this).children().eq(4).html());
$this = $(this);
$(".br_confirm").click(function(){
// 弹框中选中的值
var $Selectvalue = $("input[name='br_radiobutton']:checked").val();
$this.children().eq(4).html($Selectvalue);

$("#br_mask").css("display","none");
$("#br_userExcel").css("display","none");
$("#br_applicationStatus").css("display","none");
})
});
---------------------
作者:丧尸会跳小芭蕾
来源:CSDN
原文:https://blog.csdn.net/qq_26725075/article/details/51182929?utm_source=copy
版权声明:本文为博主原创文章,转载请附上博文链接!

posted on 2018-10-11 20:55  asdyzh  阅读(9634)  评论(0编辑  收藏  举报

导航