欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

簡(jiǎn)單的ASP分頁(yè)代碼(測(cè)試正確)

 更新時(shí)間:2007年03月03日 00:00:00   作者:  


'根據(jù)實(shí)際從庫(kù)中獲得數(shù)據(jù)并顯示數(shù)據(jù)
'-------------------------------------------

'data=rs("data")
'response.write"DATA:"&data

'-------------------------------------------

rs.movenext
  next
  call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
  end if
  rs.close
  set rs=nothing

Sub PageControl(iCount,pagecount,page,table_style,font_style)
    '生成上一頁(yè)下一頁(yè)鏈接
    Dim query, a, x, temp
    action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")

    query = Split(Request.ServerVariables("QUERY_STRING"), "&")
    For Each x In query
        a = Split(x, "=")
        If StrComp(a(0), "page", vbTextCompare) <> 0 Then
            temp = temp & a(0) & "=" & a(1) & "&"
        End If
    Next

    Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>" & vbCrLf )        
    Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR bgcolor=#f1f1f1>" & vbCrLf )
    Response.Write("<TD align=center height=35>" & vbCrLf )
    Response.Write(font_style & vbCrLf )    

    if page<=1 then
        Response.Write ("首 頁(yè) " & vbCrLf)        
        Response.Write ("上一頁(yè) " & vbCrLf)
    else        
        Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首 頁(yè)</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上一頁(yè)</A> " & vbCrLf)
    end if

    if page>=pagecount then
        Response.Write ("下一頁(yè) " & vbCrLf)
        Response.Write ("尾 頁(yè) " & vbCrLf)            
    else
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下一頁(yè)</A> " & vbCrLf)
        Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾 頁(yè)</A> " & vbCrLf)            
    end if

    Response.Write(" 頁(yè)次:" & page & "/" & pageCount & "頁(yè)" &  vbCrLf)
    Response.Write(" 共有" & iCount & "個(gè)記錄" &  vbCrLf)
    Response.Write(" 轉(zhuǎn)到" & "<INPUT CLASS=wenbenkuang TYEP=TEXT NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "頁(yè)"  & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
    Response.Write("</TD>" & vbCrLf )                
    Response.Write("</TR></form>" & vbCrLf )        
    Response.Write("</table>" & vbCrLf )        
End Sub
%>

本代碼絕對(duì)無錯(cuò)!

相關(guān)文章

最新評(píng)論