<script>
var currentPage = 1;
var totalPage = 1;
$(function () {
show(1);
});
function show(page) {
var obj = {};
obj.pageSize = 3;
obj.currentPage = page;
obj.yhfs = $("input[name='yhfs']:checked").val();
obj.hxzt = $("input[name='hxzt']:checked").val();
obj.mc = $("#mc").val();
$.ajax({
url: "http://localhost:57066/api/Shopping",
type: "get",
data: obj,
success: function (data) {
$("#totalCount").html(data.totalCount);
$("#totalPage").html(data.totalPage);
$("#currentPage").html(data.currentPage);
currentPage = data.currentPage;
totalPage = data.totalPage;
$("#tb").empty();
$(data.list).each(function () {
var line = "<tr>";
line += "<td>" + this.Name + "</td>";
line += "<td>" + this.mc + "</td>";
line += "<td>" + this.sytj + "</td>";
line += "<td>" + this.yhfs + "</td>";
line += "<td>" + this.yhfs1 + "</td>";
line += "<td>" + this.Id + "</td>";
line += "<td>" + this.lqsj + "</td>";
line += "<td>" + this.hxzt + "</td>";
line += "</tr>";
$("#tb").append(line);
});
}
});
}
</script>
MVC 显示
最新推荐文章于 2022-06-30 17:45:00 发布