<% id=request.queryString("id") if id="" then sql="select*from [pro]" else sql="select*from [pro] where CL_ID=cint('"&id&"')" end if Set RS=Server.CreateObject("ADODB.Recordset") RS.Open SQL,Conn,1,1 Dim TotalPut,N '定义变量 Dim CurrentPage '定义当前页的变量 CurrentPage = 1 TotalPut = 0 N = 1 IF Not RS.EOF Then Const MaxperPage =12 '定义每一页显示的数据记录的常量 RS.PageSize = MaxperPage CurrentPage = Request.QueryString("PageID") If CurrentPage = "" Then CurrentPage = 1 ElseIF CurrentPage <1 Then CurrentPage = 1 Else CurrentPage = CLng(CurrentPage) If CurrentPage > RS.PageCount Then CurrentPage = RS.PageCount End IF End IF '如果变量CurrentPage的数据类型不是数值型 '就1赋给变量CurrentPage IF Not IsNumeric(CurrentPage) Then CurrentPage = 1 End IF TotalPut = RS.RecordCount IF TotalPut Mod MaxperPage = 0 Then N = TotalPut \ MaxperPage Else N = TotalPut \ MaxperPage + 1 End IF IF N = 0 Then N = 1 End IF RS.Move(CurrentPage-1) * MaxperPage Dim I I = 0 Do While I < MaxperPage And Not RS.EOF %> <% i=i+1 if i mod 4 =0 then response.Write"" end if RS.movenext loop end if %>

  ◇ 广州市金来企业有限公司

  ◇ 全球汽配采购网

  ◇ 汽配商务网

  ◇ 中国汽配网