<% SQL = "Select * From GuestBook Order By 時間 DESC" Set rs = GetMdbStaticRecordset( "Gbook.mdb", SQL ) Page = CLng(Request("Page")) ' CLng 不可省略 If Page < 1 Then Page = 1 If Page > rs.PageCount Then Page = rs.PageCount ShowOnePage rs, Page %>

我要留言  <% If Page <> 1 Then Response.Write "第一頁 " Response.Write "上一頁 " End If If Page <> rs.PageCount Then Response.Write "下一頁 " Response.Write "最後一頁 " End If %> 頁次:<%=Page%>/<%=rs.PageCount%>

<% Sub ShowOnePage( rs, Page ) rs.AbsolutePage = Page For iPage = 1 To rs.PageSize RsToGbook rs rs.MoveNext If rs.EOF Then Exit For Next End Sub Sub RsToGbook( rs ) memo=Replace(rs("留言"), vbCrLf, "
" ) %>
主 題:<%=rs("主題")%>
姓 名:<%=rs("姓名")%> Email:"> <%=rs("Email")%>


<%=memo%>

時 間:<%=rs("時間")%>


<% End Sub %>