asp 단순 페이지 코드

1537 단어 asp페이지 코드

<%
set rs=server.createobject("adodb.recordset")
exce="sql" 'sql
rs.open exce,conn,1,1
%>

<%
rs.PageSize=3 ‘
pagecount=rs.PageCount '
page=int(request("page")) '
if page<=0 then page=1 '
if request("page")="" then page=1
rs.AbsolutePage=page '
%>
body
<%
if rs.bof and rs.eof then
response.write("NULL")
else
for i=1 to rs.PageSize
response.write rs("name")
response.write("<hr>")
rs.movenext
next
end if
%>
<p>
<%if page=1 and not page=pagecount then%>
|
<a href="log1.asp?page=<%=page+1%>"> </a>|
<a href="log1.asp?page=<%=pagecount%>"> </a>
<%elseif page<>1 and not page=pagcount then%>
<a href="log1.asp?page=1"> </a>|
<a href="log1.asp?page=<%=page-1%>"> </a>|
<a href="log1.asp?page=<%=page+1%>"> </a>|
<a href="log1.asp?page=<%=pagecount%>"> </a>
<%elseif page=pagecount then%>
<a href="log1.asp?page=1"> </a>|
<a href="log1.asp?page=<%=page-1%>"> </a>|
|

<%end if%>

좋은 웹페이지 즐겨찾기