1、bootstrapTable 点击事件
$('#getCqltj').on('click-row.bs.table', function (e, row, element)
{
alert(2222+row.xm);//获取到姓名
});
该点击事件放在页面加载时执行即可,点击某一行则可以获取到改行的相关数据。
2、bootstrapTable 刷新事件
var param = {
url : '../ajaxjsp/cqltj_json.jsp?type=getCqltj'
+ '&name=' + encodeURI(encodeURI(name))
+ '&search_name='
+ encodeURI(encodeURI(search_name))
+ '&year_month='
+ encodeURI(encodeURI(year_month))
}
$('#getCqltj').bootstrapTable('refresh',param);
其中: param参数为心情求的url
3、bootstrapTable 获取所有数据
var allTableData = $('#getCqltj').bootstrapTable('getData');
var data = JSON.stringify(allTableData);