最新下载
热门教程
- 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://local/api/data/?format=json", silent:true, query:{ type:1, level:2 } }; $("#item_table").bootstrapTable('refresh', opt); }); |
refresh发出的请求url为
“http://local/api/data/?format=json&type=1&level=2”
相关文章
- 原神微风饮游攻略大全 04-30
- 英雄联盟手游佛耶戈什么时候出 英雄联盟手游佛耶戈推出时间介绍 04-30
- 鸣潮声骸预抽卡活动怎么抽 鸣潮声骸预抽卡活动抽取方法 04-30
- 鸣潮声骸预抽卡活动在哪 鸣潮声骸预抽卡网页活动地址 04-30
- 鸣潮声骸预抽卡活动规则是什么 鸣潮共鸣觉醒声骸召唤活动介绍 04-30
- 保卫萝卜4周赛4.30怎么过 保卫萝卜4周赛4月30日通关攻略2024 04-30