bootstrap-table使用总结

1.下载

https://github.com/wenzhixin/bootstrap-table


2.文档

http://bootstrap-table.wenzhixin.net.cn/zh-cn/documentation/


3.应用

css文件   

    <link rel="stylesheet" href="/stylesheet/bootstrap.css">
    <link rel="stylesheet" href="/stylesheet/bootstrap-theme.css">
    <link rel="stylesheet" href="/stylesheet/bootstrap-table.min.css">



js文件

    <script src="jquery.min.js"></script> 

    <script src="bootstrap.min.js"></script> 

    <script src="bootstrap-table.js"></script> 

    <script src="bootstrap-table-zh-CN.js"></script>


bootstrap-table使用总结


bootstrap-table使用总结

注意:url和data的区别是:url是异步请求远程数据;data是直接把数据赋值给他。在主表和子表都一样可以这样使用。


另外一种用法:

HTML:

bootstrap-table使用总结


JS:

bootstrap-table使用总结



bootstrapTable refresh 方法如何传递参数

$("#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);});