当前位置:

Netease BBS 精华 >>讨论区精华 >>电脑技术 >>● ASP >>ASP典型范例

发信人: shebin (斌斌), 信区: ASP
标  题: Re: 翻页设计如何实现?
发信站: 网易虚拟社区 (Fri Feb 26 16:19:17 1999), 转信

【 在 hang (城市猎人) 的大作中提到: 】
:  我是ASP初学者,请教高手
:  显示数据库记录时怎么实现翻页最好?
:  谢谢。
翻页实例:

sub showpages()
dim n
    if totalAnnounce mod maxannounce=0 then
    n= totalAnnounce \ maxannounce
    else
    n= totalAnnounce \ maxannounce+1
    end if
    dim k
    for k=1 to n
    if k=currentPage then
    if k=1 then
response.write "<td align='center'><a href='list.asp?BoardID="+cstr(bo
ardID)+"&page="+cstr(k+1)+"'><img src='images/down.gif' border='0'></a
></td>"
else
if k=n then
response.write "<td align='center'><a href='list.asp?BoardID="+cstr(bo
ardID)+"&page="+cstr(k-1)+"'><img src='images/up.gif' border='0'></a><
/td>"
else
response.write "<td><a href='list.asp?BoardID="+cstr(boardID)+"&page="
+cstr(k-1)+"'><img src='images/up.gif' border='0'></a></td>"
response.write "<td><a href='list.asp?BoardID="+cstr(boardID)+"&page="
+cstr(k+1)+"'><img src='images/down.gif' border='0'></a></td>"
end if
end if
    end if
    next
    response.write "<br>"
end sub



--
※ 来源:.网易虚拟社区 http://club.netease.com.[FROM: 202.96.132.69]


当前位置:

Netease BBS 精华 >>讨论区精华 >>电脑技术 >>● ASP >>ASP典型范例
 
(C)1997-1998 版权所有
广州网易计算机系统有限公司