博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
bootstrap table 收缩_bootstrap-table方法之:expandRow-collapseRow,展开或关闭当前行数据...
阅读量:4678 次
发布时间:2019-06-09

本文共 705 字,大约阅读时间需要 2 分钟。

48304ba5e6f9fe08f3fa1abda7d326ab.png

expandRow-collapseRow

expandRow-collapseRow

expandRow

collapseRow

data-toggle="table"

data-toolbar="#toolbar"

data-height="460"

data-detail-view="true"

data-detail-formatter="detailFormatter"

data-url="../json/data1.json">

IDItem NameItem Price

var $table = $('#table'),

$button = $('#button'),

$button2 = $('#button2');

$(function () {

$button.click(function () {

$table.bootstrapTable('expandRow', 1);

});

$button2.click(function () {

$table.bootstrapTable('collapseRow', 1);

});

});

function detailFormatter(index, row) {

var html = [];

$.each(row, function (key, value) {

html.push('

' + key + ': ' + value + '

');

});

return html.join('');

}

转自:http://www.cnblogs.com/huangdegen/articles/5479021.html

你可能感兴趣的文章
Oracle EBS 初始化用户密码
查看>>
SYS_CONTEXT 详细用法
查看>>
Pycharm配置autopep8让Python代码更符合pep8规范
查看>>
函数的复写
查看>>
17_重入锁ReentrantLock
查看>>
winform窗口关闭提示
查看>>
64款工具,总有合适您的那款
查看>>
我的第一篇博客
查看>>
大数据学习线路整理
查看>>
【C++算法与数据结构学习笔记------单链表实现多项式】
查看>>
关于ProjectServer定制化项目中心页面
查看>>
使用Collectd + InfluxDB + Grafana进行JMX监控
查看>>
Linux下tar,zip命令详解
查看>>
C#垃圾回收机制
查看>>
31、任务三十一——表单联动
查看>>
[ios] IOS文件操作的两种方式:NSFileManager操作和流操作【转】
查看>>
Jenkins之Linux和window配置区别
查看>>
python之hasattr、getattr和setattr函数
查看>>
maven使用阿里镜像配置文件
查看>>
Java之字符流操作-复制文件
查看>>