移动端分页
2023-07-02阅读:2558
演示效果:
List_Config.asp中的分页函数:
'显示分页 Function ShowPage() %> <div class="page"> <ul> <%if CurPage=1 then%> <li><p>上一页</p></li> <%else%> <li><a href="?SortID=<%=SortID%>&Item7=<%=Item7%>&Item5=<%=Item5%>&CurPage=<%=CurPage-1%>">上一页</a></li> <%end if%> <%if ListRs.PageCount<CurPage+1 then%> <li><p>下一页</p></li> <%else%> <li><a href="?SortID=<%=SortID%>&Item7=<%=Item7%>&Item5=<%=Item5%>&CurPage=<%=CurPage+1%>">下一页</a></li> <%end if%> </ul> </div> <% ListRs.close set ListRs=nothing End Function %>
css代码:
/* 分页样式定义开始 */ .page{margin-top: 15px;} .page ul{width: 280px;margin: 0px auto;} .page li{width: 120px;float: left;line-height: 28px;margin-left: 20px;} .page a{display: block;width: 100%;border: 1px solid #F2720F;background: #F2720F; color: #FFF; text-align: center;font-size: 14px;} .page p{display: block;width: 100%;border: 1px solid #DDD;background: #FFF; color: #DDD;text-align: center;font-size: 14px;} /* 分页样式定义结束 */
List.asp调用函数:
<%=ShowPage%>