django FE bootstrap-table

1.导入bootstrap-table-develop/dist/bootstrap-table.min.js

2.

<script>

$('#item_table').bootstrapTable({  

columns: [{field: 'id',title: 'Item ID'},{field: 'name',title: 'Item Name'}, {field: 'price',title: 'Item Price'}], data: [{id: 1,name: 'Item 1',price: '$1'}, {id: 2,name: 'Item 2',price: '$2'}]

});

$("#refresh_button").click(function ()

{var opt = {url: "http://local/api/data/?format=json",silent: true,query:{type:1,level:2}};

$("#item_table").bootstrapTable('refresh', opt);});

script>


参考:http://blog.csdn.net/lanyang123456/article/details/55805478

你可能感兴趣的:(frontend,Django)