当前位置:Gxlcms > JavaScript > jQuerygetJSON()+.ashx实现分页(改进版)_jquery

jQuerygetJSON()+.ashx实现分页(改进版)_jquery

时间:2021-07-01 10:21:17 帮助过:15人阅读

参考了:http://www.gxlcms.com/article/35110.htm
改进的地方:
1、ashx返回json数据,减少传输数据量,html页面样式控制也比较灵活;
2、改写html页的jQuery代码;
3、把3个ashx文件简化为1个。
一、创建表的测试数据
代码如下:

create table test(id int identity,title varchar(36))
declare @index int;
set @index = 1;
while(@index < 8888)
begin
insert test(title) values (newid())
set @index = @index + 1
end

二、.html页
代码如下: