html代码如下:

<table
>断面名称</th>

</tr>

</thead>
</table>

 

 

 

js如下:

 

$("#table").on("click-row.bs.table",function(e,row,ele){
$(".danger").removeClass("danger");
$(ele).addClass("danger");
});

/*获取选中行对象*/
function getContent(){
var index = $("#table").find("tr.danger").data("index");
var list = $("#table").bootstrapTable('getData')[index];
if(list==null){
alert("请选中一行");
return false;
}else{
$("#modal3").attr({"data-target":"#myModal3"});
}
$("#dataForm3 input[type='text']").each(function(){
$(this).val(list[$(this).attr("name")] ? list[$(this).attr("name")] : "");
});
}

 

参考:http://www.jb51.net/article/89573.htm

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-22
  • 2022-12-23
  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-09
  • 2021-11-04
  • 2021-11-04
相关资源
相似解决方案