【发布时间】:2018-07-01 03:07:09
【问题描述】:
我正在使用 jQuery Bootgrid,我在分页上遇到了 2 个问题,这是我的 javascript 代码
从下面的代码数据方法传递为 GET,即使我没有在我的代码中提到 GET。(我知道默认方法 POST),另外我试图将其作为 ajax 设置中的 POST 方法,但不工作
使用下面的代码时,第一次加载 current 传递为 1,所以第一页显示没有任何问题,当我点击分页时,current 页面元素未通过,因此整个表格数据列表显示,但所有其他数据均正确通过
电流丢失 从控制台:GET http://localhost/do_dubai/vat_invoice/get_list/?rowCount=200&searchPhrase=&date_from=&date_to=&status=
var grid = $("#grid-data").bootgrid({
ajax: true,
rowCount: [200, 100, 50, -1],
url: "http://localhost/do_dubai/vat_invoice/get_list/",
post: function ()
{
date_from = $("#date_from").val();
date_to = $("#date_to").val();
status = $("#status").val();
return {
"date_from": date_from,
"date_to": date_to,
"status": status
}
}
});
【问题讨论】:
标签: jquery ajax pagination jquery-bootgrid