标签:需要 ice index src image pos name ++ service
$.ajax({ url: ‘http://localhost:8486/WebService.asmx/GetUsert‘, type: ‘post‘, data: { pageindex: dangqian, pagesize: tiaoshu, PhoneCode: $("#shouji").val(), XingHCode: $("#xinghao").val(), UsertName: $("#tname").val(), }, success: function (data) { dangqian = data.PageIndex; Pagesum = data.PageSum; $("#ta").children().children().not(":first").remove(); $(data.Data).each(function (index, data) { $("#ta").append("<tr><td>" + data.UsertID + "</td><td>" + data.UsertName + "</td><td>" + (data.UsertSex == 0 ? ‘男‘ : ‘女‘) + "</td><td>" + data.XingHCode + "</td><td>" + data.XingHName + "</td><td>" + data.PhoneName + "</td><td>" + data.PhoneCode + "</td><td><img src=‘" + data.UsertImages + "‘ style=‘width:100px;height:100px;‘/></td><td><a href=‘#‘ onclick=‘del(" + data.UsertID + ")‘>删除</a></td></tr>"); }) } })
新建类:当前页,总页,对象
本页需要实例化:当前页=1,总页数=0,条数=3
function first()
{
dangqian = 1;
cha();
}
function zuihou()
{
dangqian = Pagesum;
cha();
}
//下一页
function NextPage() {
if (dangqian + 1 > Pagesum) {
alert(‘已经是最后一页‘);
return;
}
dangqian++;
cha();
}
//上一页
function PreivousPage() {
if (dangqian - 1 <= 0) {
alert(‘已经是第一页‘);
return;
}
dangqian--;
cha();
}
//模糊查询
function mohu()
{
dangqian = 1;
cha();
}
标签:需要 ice index src image pos name ++ service
原文地址:https://www.cnblogs.com/caoxiaole/p/9387616.html