bootstrap 实现两个表格之间数据的传递

通过bootstrapTable的append实现 将左表的数据添加到右表中

原地址:http://www.voidcn.com/article/p-endhzkll-bgr.html

Js代码

$tableLeft = $('#table_left').bootstrapTable("refresh", {
    url: '/Containers/getPoItems/' + selectedTypeID
});

$tableRight = $('#table_right').bootstrapTable();

$('#left2Right').click(function () {
    $tableRight.bootstrapTable('removeAll');
    var selectedContent = $tableLeft.bootstrapTable('getSelections');
    $tableRight.bootstrapTable("append", selectedContent);
});
相关文章

相关标签/搜索