var a= $table.bootstrapTable('getSelections');
if(a.length==1){
b.val(a[0].id);
}else{alert("请选中一行")}
var a= $table.bootstrapTable('getSelections');
if(a.length==1){
b.val(a[0].id);
}else{alert("请选中一行")}
转载于:https://www.cnblogs.com/smallthen/p/6732215.html