The following are the referenced contents: <% Class Aspxsky_page Private Sub Class_Initialize End Sub Public Function Alert (Message,gourl) message = replace (message, "'", "\") If gourl= "-1" Then Response.Write ("<script language=javascript>alert (' & Message &"); History.go ( -1) </script> ") Else Response.Write ("<script language=javascript>alert (' & Message &"); location= ' & Gourl & "' < /script> ") End If Response.End () End Function Public Sub showpage (Str,page,url) If not isnumeric (page) Then Alert "Hint: wrong arguments!", "-1" End If If page= "" or page=0 or IsNull (page) or IsEmpty (page) Then Page=1 Else Page=cint (page) End If Str=split (str, "{nextpage}") Abspage=page Pcount=ubound (str) +1 If Page>cint (UBound (str) +1) or page<1 Then Alert "Hint: wrong arguments!", "-1" Else Response.Write Str (page-1) & "<br><br><center> divided into" &pcount& "page" End If For p = To UBound (str) Response.Write "<a href=" &url& "p=" &p+1& ">[" &p+1& "]</a>" Next Response.Write "Current &abspage&"/"&pcount&" page </center> End Sub End Class '------------------Call----------------------- P=request. QueryString ("P") str= "First page: This is the first page of content {nextpage} The second page: This is the content of the second page" Url= "shownews.asp?id=" &id& "&" Set Newpage=new aspxsky_page Newpage.showpage Str,p,url %>
|