网页设计代码

来源:百度知道 编辑:UC知道 时间:2024/05/07 17:17:06
在网页设计时我们有很多文件,比如说有60篇文件,我想在设计时每页显示10篇,共有6页,在网页下方我想让其自动显示"1 2 3 4 5 6 共6页",如果以后文件增加此显示还是自动显示"1 2 3 4 5 6 7 8 共8页"这样的显示,我也不知道这算是什么代码,反正就是这个意思,望哪位高手指点!谢谢!

<table width="98%" height="167" border="0" align="center" cellpadding="0" cellspacing="0">
<%
if not isempty(request("page")) and request("page")<>"" then
currentPage=cint(request("page"))
else
currentPage=1
end if
MaxPerPage=16
Set rs=server.CreateObject ("adodb.recordset")
sql="select * from wz where class='"&request("class")&"'"
rs.Open sql,conn,1,1
if not rs.EOF then
rs.PageSize=maxperpage
mpage=rs.PageCount
totalput=rs.RecordCount
if currentpage<1 then
currentpage=1
end if
rs.Move (currentpage-1)*maxperpage
end if
if rs.EOF and rs.bof then
response.Write ("暂时没有记录!")

else
k=(totalput-maxperpage*(currentpage-1))+