resonsehandler 接受服务端传过来的数据,然后在这个函数里处理好要显示的数据在return个table显示

<!DOCTYPE html>
<html lang="zh-cn">
<head>
<title>bootstrapTable</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/> <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script> <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> <!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://unpkg.com/bootstrap-table@1.13.5/dist/bootstrap-table.min.css"> <!-- Latest compiled and minified JavaScript -->
<script src="https://unpkg.com/bootstrap-table@1.13.5/dist/bootstrap-table.min.js"></script>
<!-- Latest compiled and minified Locales -->
<script src="https://unpkg.com/bootstrap-table@1.13.5/dist/locale/bootstrap-table-zh-CN.min.js"></script> <link href="" rel="stylesheet">
<script src="" type="text/javascript"></script>
<style> </style>
</head> <body>
<table id="table"></table> <script>
$(function() {
$('#table').bootstrapTable({
url: 'json/353.json',
columns: [{
field: 'date',
title: 'Date Stamp',
sortable: true
}, {
field: 'm_type',
title: 'Type',
sortable: true
}, {
field: 'msdn',
title: 'MSDN',
sortable: true
}, {
field: 'file_name',
title: 'File Name',
sortable: true
}, {
field: 'message',
title: 'Message',
sortable: true
}],
responseHandler: function (res) { console.log(res)
return res.messages
}
})
})
</script> </body>
</html>

json:

{
"messages": [
{
"id": 652,
"session_id": 8965861649940144331,
"date": "2014-12-17T01:01:09Z",
"m_type": "Error",
"message": "could not find a matching MDF file for legacy SQL selection $SQL:\\(local)\\Adams",
"file_name": "$SQL:\\(local)\\Adams",
"msdn": 33
},
{
"id": 653,
"session_id": 8965861649940144331,
"date": "2014-12-17T01:01:10Z",
"m_type": "Error",
"message": "could not find a matching MDF file for legacy SQL selection $SQL:\\(local)\\TRAINING",
"file_name": "$SQL:\\(local)\\TRAINING",
"msdn": 33
}
],
"session_id": 8965861649940144331,
"date": "2014-12-17T01:55:14Z",
"client_date": "2014-12-16T19:55:14Z",
"actual_cpu": "",
"licensed_cpu": "",
"license": 1,
"brand": 2,
"account": 215,
"computer": 289,
"regcode": "1:2:215:289"
}

responseHandler的更多相关文章

  1. sidePagination: "server"和responseHandler: responseHandler

    bootstrapTable()中有两个属性 一个是sidePagination,表示服务器分页,responseHandler:responseHandler 表示回应操作的rows和total 两 ...

  2. HttpClient(4.3.5) - ResponseHandler

    The simplest and the most convenient way to handle responses is by using the ResponseHandler interfa ...

  3. 快速Android开发系列网络篇之Android-Async-Http

    先来看一下最基本的用法 AsyncHttpClient client = new AsyncHttpClient(); client.get("http://www.google.com&q ...

  4. MyCat源码分析系列之——结果合并

    更多MyCat源码分析,请戳MyCat源码分析系列 结果合并 在SQL下发流程和前后端验证流程中介绍过,通过用户验证的后端连接绑定的NIOHandler是MySQLConnectionHandler实 ...

  5. MyCat源码分析系列之——SQL下发

    更多MyCat源码分析,请戳MyCat源码分析系列 SQL下发 SQL下发指的是MyCat将解析并改造完成的SQL语句依次发送至相应的MySQL节点(datanode)的过程,该执行过程由NonBlo ...

  6. MyCat源码分析系列之——前后端验证

    更多MyCat源码分析,请戳MyCat源码分析系列 MyCat前端验证 MyCat的前端验证指的是应用连接MyCat时进行的用户验证过程,如使用MySQL客户端时,$ mysql -uroot -pr ...

  7. 企业号微信支付 公众号支付 H5调起支付API示例代码 JSSDK C# .NET

    先看效果 1.本文演示的是微信[企业号]的H5页面微信支付 2.本项目基于开源微信框架WeiXinMPSDK开发:https://github.com/JeffreySu/WeiXinMPSDK 感谢 ...

  8. httpClient实现微信公众号消息群发

    1.实现功能 向关注了微信公众号的微信用户群发消息.(可以是所有的用户,也可以是提供了微信openid的微信用户集合) 2.基本步骤 前提: 已经有认证的公众号或者测试公众账号 发送消息步骤: 发送一 ...

  9. 微信支付(.NET版)

    前段时间做了网页版微信支付,遇到很多问题,不过最终还是解决了,现在在这里记录下开发流程以及说明,给其他人一些参考. 一.准备工作     首先肯定得先要开通微信支付功能,之前开通微信支付需要三万的押金 ...

随机推荐

  1. python-包及日志模块使用

    一.包 1.包就是一个保护有__init__.py文件的文件夹,包的本质就是一种模块,即包是用来导入使用的,包内部包含的文件也都是用来被导入使用的.包是为了更好组织好模块,就是一个文件夹. 注:在py ...

  2. python 排序 sort和sorted

    当我们从数据库中获取一写数据后,一般对于列表的排序是经常会遇到的问题,今天总结一下python对于列表list排序的常用方法: 第一种:内建方法sort() 可以直接对列表进行排序 用法: list. ...

  3. spring springMvc spring-boot spring-cloud分别是什么

    本文来源于:克己习礼成仁   的<spring springMvc spring-boot spring-cloud分别是什么> 什么是spring 关于spring的定义无论是从官方还是 ...

  4. 在 Linux 中自动启动 Confluence 6

    在 Linux/Solaris 环境下,最好的办法是对每一个服务进行安装和配置(包括 Confluence),同时配置这些服务权限为他们所在用户需要的服务权限即可, 为实例创建一个 Confluenc ...

  5. ios蓝牙详解

    最近这段时间在研究蓝牙,也研究了一段时间了现在在下面做个总结 1 其实蓝牙连接只要明白了整体原理,其实挺简单的  2 大部分情况下,手机作为中心管理者,而连接的设备被称为外设,外设的结构有点像一颗大树 ...

  6. Linux 用户切换、修改用户名、修改密码

    一.用户切换 "$":普通用户提示符 "#":root用户提示符 1.普通用户到root: 方式一:命令:su然后输入root密码 此种方式只是切换了root身 ...

  7. selenium+python-autoit文件上传

    前言 关于非input文件上传,点上传按钮后,这个弹出的windows的控件了,已经跳出三界之外了,不属于selenium的管辖范围(selenium不是万能的,只能操作web上元素).autoit工 ...

  8. vue-cli watch简单用法

    创建一个vue单文件 <template> <div id="test"> <h4 @click="changeMsg()" id ...

  9. Android取得系统时间

    Time t = new Time();//实例化Time类 t.setToNow();//取得当前的系统时间 int month = t.month;//获取月 int year = t.year; ...

  10. 蓝桥杯  历届试题 剪格子  dfs

    历届试题 剪格子 时间限制:1.0s   内存限制:256.0MB 问题描述 如下图所示,3 x 3 的格子中填写了一些整数. +--*--+--+ |10* 1|52| +--****--+ |20 ...