1.用户提交信息过滤表格内容:
a.设置表格查询参数,并在用户提交按钮时候更新表格
<form id="current_table" class="form-inline" role="form" onSubmit="return table_filter(this);"> ... </form> <table id='table1' data-url="..."> ... </table> <script> $("#table1").bootstrapTable({ 'onPageChange':function(number, size){ }, 'queryParams':function (params){ s_data=$('form').serializeArray(); for (key in s_data){ item=s_data[key]; var1=item["name"]; var2=item["value"]; params[var1]=var2; } return params } }); function table_filter(current){ $("#comsumptionlist").bootstrapTable('refresh', { 'onPageChange':function(number, size){ } }); return false; } </script>