asp 上一页下一页 数据库分类
我在网站的产品总列表中使用的是如下代码,在产品的分类列表中也想用上一页下一页功能,只是针对某类。如何修改或如何编写代码呢?跪求各位高手指点一二,小女子不胜感激!在线等答案...
我在网站的 产品总列表 中使用的是如下代码,在产品的 分类列表中 也想用上一页下一页功能,只是针对某类。如何修改或如何编写代码呢?跪求各位高手指点一二,小女子不胜感激!在线等答案......
<%
'=========产品展示样式==============
Response.Write"<table width='100%' class='Pagination' border='0' cellspacing='0' cellpadding='1' ><tr><td height='18'align='center' >当前页"&ipagecurrent&"/"&ipagecount&" 共有"&irecordcount&"条信息 每页"&ProductsShu&"条 "
if ipagecurrent=1 then
Response.Write" 首页 | "
else
Response.Write" <a href='ProductsList.asp?page=1'>首页</a> | "
end if
if ipagecurrent=1 then
Response.Write"上一页 | "
else
Response.Write"<a href='ProductsList.asp?page="&ipagecurrent-1&"'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write" <a href='ProductsList.asp?page="&ipagecurrent+1&"'>下一页</a> "
else
Response.Write" 下一页 "
end if
if ipagecount>ipagecurrent then
Response.Write"| <a href='ProductsList.asp?page="&ipagecount&"'>末页</a>"
else
Response.Write"| 末页"
end if
Response.Write" 转到第<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
for i = 1 to ipagecount
if i = ipagecurrent then
Response.Write"<option value='ProductsList.asp?page="&i&"' selected>"&i&"</option>"
else
Response.Write"<option value='ProductsList.asp?page="&i&"'>"&i&"</option>"
end if
next
Response.Write"</select>页</td></tr></table>"
%> 展开
<%
'=========产品展示样式==============
Response.Write"<table width='100%' class='Pagination' border='0' cellspacing='0' cellpadding='1' ><tr><td height='18'align='center' >当前页"&ipagecurrent&"/"&ipagecount&" 共有"&irecordcount&"条信息 每页"&ProductsShu&"条 "
if ipagecurrent=1 then
Response.Write" 首页 | "
else
Response.Write" <a href='ProductsList.asp?page=1'>首页</a> | "
end if
if ipagecurrent=1 then
Response.Write"上一页 | "
else
Response.Write"<a href='ProductsList.asp?page="&ipagecurrent-1&"'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write" <a href='ProductsList.asp?page="&ipagecurrent+1&"'>下一页</a> "
else
Response.Write" 下一页 "
end if
if ipagecount>ipagecurrent then
Response.Write"| <a href='ProductsList.asp?page="&ipagecount&"'>末页</a>"
else
Response.Write"| 末页"
end if
Response.Write" 转到第<select name='sel_page' onChange='javascript:location=this.options[this.selectedIndex].value;'>"
for i = 1 to ipagecount
if i = ipagecurrent then
Response.Write"<option value='ProductsList.asp?page="&i&"' selected>"&i&"</option>"
else
Response.Write"<option value='ProductsList.asp?page="&i&"'>"&i&"</option>"
end if
next
Response.Write"</select>页</td></tr></table>"
%> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询