var a= $table.bootstrapTable('getSelections');
if(a.length==1){
b.val(a[0].id);
}else{alert("请选中一行")}