bootstrapTable.js 使用

1 引用css /引用bbostrap.css
2.引用js 
使用方法

 $("#data").bootstrapTable({
                method: "post",
                url: "List.ashx",
                pagination: true,
                sortOrder: "desc",
                queryParams: function queryParams(params) {
                    var param = {
                        action:"list",
                        pageNumber: params.pageNumber,
                        pageSize: params.pageSize
                    };
                    return param;
                },
                clickToSelect: true,
                pageSize: 10,
                pageNumber: 1,
                pageList: [5, 10, 15, 20, 25],
                sidePagination: "server",
                queryParamsType: "undefined", //使用PageSize 和PageNumber
                contentType: "application/x-www-form-urlencoded",
                columns: [
                    {
                        checkbox: true
                    }, {
                        field: 'b_starttime',
                        title: '开始日期'

                    },  {
                        formatter: function (value, row, index) {
                            return "<a  onclick='del(" + row.m_id + ")' >删除</a> ";
                        },
                        title: '操作'
                    } 
                ]

            });

 

posted @ 2017-02-22 10:39  SSS.M.AAA  阅读(414)  评论(0编辑  收藏  举报