bootstrap-table实现 行拖拽 的简单操作

引用 jquery.tablednd.js

bootstrap-table-reorder-rows.js

bootstrap-table-reorder-rows.css文件链接地址https://download.csdn.net/download/tianbinve3363/10770424

拖拽前原始表

拖拽使用后

代码如下,写在cshtml文件里,<table>标签也仅需加上 data-use-row-attr-func="true"  data-reorderable-rows="true" 即可.

<link href="~/Content/bootstrap-table-reorder-rows.css" rel="stylesheet" />

<script src="~/Script/jquery.tablednd.js"></script>
<script src="~/Script/bootstrap-table-reorder-rows.js"></script>

<table id="table"
                           data-use-row-attr-func="true"
                           data-reorderable-rows="true"></table>
                </div>

猜你喜欢

转载自blog.csdn.net/tianbinve3363/article/details/83827251