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
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM