最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
BootstrapTable refresh 方法使用实例简单介绍
时间:2022-06-25 14:27:14 编辑:袖梨 来源:一聚教程网
本文就bootstrapTable refresh 方法如何传递参数做简单举例说明。下面代码中,一个table,一个button,单击button会触发刷新表格操作。
代码如下 | 复制代码 |
$('#item_table').bootstrapTable({ columns: [{ field:'id', title:'Item ID' }, { field:'name', title:'Item Name' }, { field:'price', title:'Item Price' }], data: [{ id: 1, name:'Item 1', price:'$1' }, { id: 2, name:'Item 2', price:'$2' }] }); $("#refresh_button").click(function(){ varopt = { url:"http://lo**ca*l/api/data/?format=json", silent:true, query:{ type:1, level:2 } }; $("#item_table").bootstrapTable('refresh', opt); }); |
refresh发出的请求url为
“http://lo**ca*l/api/data/?format=json&type=1&level=2”
相关文章
- 光隙解语布兰琪角色怎么样 10-21
- 燕云十六声添加好友方法攻略分享 10-21
- 英雄联盟手游纳尔怎么出装2025-迷失之牙纳尔出装推荐 10-21
- 燕云十六声联机模式切换方法分享 10-21
- 燕云十六声第一天拿大轻功方法分享 10-21
- 流放之路2未切割宝石获取方法分享 10-21