sub showImg(num)
if instr(num/MaxPerpage,".")>0 then
TotalPages=FIX(num/MaxPerPage)+1
else
TotalPages=FIX(num/MaxPerPage)
end if
If trim(Request("page"))<>"" then
CurrentPage= CLng(request("page"))
If CurrentPage> Totalpages then
CurrentPage = Totalpages
End If
End If
if CurrentPage=TotalPages then
endnum=num
else
endnum=currentpage*MaxPerPage
end if
for i=(currentpage-1)*MaxPerPage+1 to endnum
if i mod 4 =1 then
response.write "<tr>"
end if
if i<10 then
j="0"&i
else
j=i
end if
response.write "<td width='25%'><a href='n2.asp?img="&j&"'><IMG src='images/"&j&".gif'></td>"
if i mod 4 =0 then
response.write "</tr>"
end if
next
end sub
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<%
call showImg(60)%>
</table>
<center>
<%
if currentPage<>1 then
response.write "<a href='n1.asp?page=1'>首页</a> "
response.write "<a href='n1.asp?page="&cstr(currentpage-1)&"'>上一页</a> "
end if
if currentPage<>TotalPages then
response.write "<a href='n1.asp?page="&cstr(currentpage+1)&"'>下一页</a> "
response.write "<a href='n1.asp?page="&TotalPages&"'>尾页</a> "
end if
%>
</center>
n1.asp
<%
'num为图片数
function showImg(num)
for i=1 to num
if i mod 4 =1 then
response.write "<tr>"
end if
if i<10 then
j="0"&i
else
j=i
end if
response.write "<td width='25%'><a href='n2.asp?img="&j&"'><IMG src='images/"&j&".gif'></td>"
if i mod 4 =0 then
response.write "</tr>"
end if
next
end function
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<%showImg(20)%>
</table>
--------------
n2.asp
<img src="<%respose.write request("img")&".gif"%>">
<%
'num为图片数
function showImg(num)
for i=1 to num
if i mod 4 =1 then
response.write "<tr>"
end if
if i<10 then
j="0"&i
else
j=i
end if
response.write "<td width='25%'><IMG src='images/"&j&".gif'></td>"
if i mod 4 =0 then
response.write "</tr>"
end if
next
end function
%>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<%showImg(13)%>
</table>