responseHandler
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的更多相关文章
- sidePagination: "server"和responseHandler: responseHandler
bootstrapTable()中有两个属性 一个是sidePagination,表示服务器分页,responseHandler:responseHandler 表示回应操作的rows和total 两 ...
- HttpClient(4.3.5) - ResponseHandler
The simplest and the most convenient way to handle responses is by using the ResponseHandler interfa ...
- 快速Android开发系列网络篇之Android-Async-Http
先来看一下最基本的用法 AsyncHttpClient client = new AsyncHttpClient(); client.get("http://www.google.com&q ...
- MyCat源码分析系列之——结果合并
更多MyCat源码分析,请戳MyCat源码分析系列 结果合并 在SQL下发流程和前后端验证流程中介绍过,通过用户验证的后端连接绑定的NIOHandler是MySQLConnectionHandler实 ...
- MyCat源码分析系列之——SQL下发
更多MyCat源码分析,请戳MyCat源码分析系列 SQL下发 SQL下发指的是MyCat将解析并改造完成的SQL语句依次发送至相应的MySQL节点(datanode)的过程,该执行过程由NonBlo ...
- MyCat源码分析系列之——前后端验证
更多MyCat源码分析,请戳MyCat源码分析系列 MyCat前端验证 MyCat的前端验证指的是应用连接MyCat时进行的用户验证过程,如使用MySQL客户端时,$ mysql -uroot -pr ...
- 企业号微信支付 公众号支付 H5调起支付API示例代码 JSSDK C# .NET
先看效果 1.本文演示的是微信[企业号]的H5页面微信支付 2.本项目基于开源微信框架WeiXinMPSDK开发:https://github.com/JeffreySu/WeiXinMPSDK 感谢 ...
- httpClient实现微信公众号消息群发
1.实现功能 向关注了微信公众号的微信用户群发消息.(可以是所有的用户,也可以是提供了微信openid的微信用户集合) 2.基本步骤 前提: 已经有认证的公众号或者测试公众账号 发送消息步骤: 发送一 ...
- 微信支付(.NET版)
前段时间做了网页版微信支付,遇到很多问题,不过最终还是解决了,现在在这里记录下开发流程以及说明,给其他人一些参考. 一.准备工作 首先肯定得先要开通微信支付功能,之前开通微信支付需要三万的押金 ...
随机推荐
- vi快速查找
用vim时,想高亮显示一个单词并查找的方发,将光标移动到所找单词. 1: shift + "*" 向下查找并高亮显示 2: shift + "#" 向上查找 ...
- npm cnpm +nodejs
nodejs win+r 打开cmd.命令:1.node -v (查看版本信息)2.npm -v (查看版本信息)3.npm install -g cnpm –registry=https:/ ...
- Confluence 6 隐藏人员目录
人员目录提供了你 Confluence 中所有用户的列表. 如果你希望禁用人员目录,请在你应用程序命令行中的 Configuring System Properties 进行设置. 希望为匿名用户禁用 ...
- caffe2安装
参考http://blog.csdn.net/Andy965/article/details/70808909?locationNum=5&fps=1 建议将make 和make instal ...
- ionic3 Injectable 引入NavController
在service里 引入 navcontroller 报错 And I get error No provider for NavController. 一个比较容易解决的方法, import {Io ...
- 前端之css样式(选择器)。。。
一.css概述 CSS是Cascading Style Sheets的简称,中文称为层叠样式表,对html标签的渲染和布局 CSS 规则由两个主要的部分构成:选择器,以及一条或多条声明. 例如 二.c ...
- 【python】安装hyperscan-python
环境centos6.2 1. 先安装hyperscan 主要参考http://blog.csdn.net/cheng_fangang/article/details/51143412 注意:里面2.8 ...
- SQLmap注入启发式检测算法
1.经过setTargetEnv()就进入了checkWaf()的环节 def checkWaf(): """ Reference: http://sec ...
- Django注册页面配置设计
一.上次回顾 Django数据的增查改删 models 中有userInfo 三个字段 user password phonenumber,models.userInfo.objects.all(). ...
- C++ LocalAlloc() & LocalSize() & LocalFree ()
关于LocalAlloc function,参考:https://msdn.microsoft.com/en-us/library/windows/desktop/aa366723(v=vs.85). ...