% 'ASP通用分页类 '江鸿宾(QQ33080907) '最近修改:2020.12.09 '本类只用于作者参与的项目,未经许可请勿转载 '定义导航按钮的样式 Const Btn_First = "9" Const Btn_Prev10 = "7" Const Btn_Prev = "3" Const Btn_Next = "4" Const Btn_Next10 = "8" Const Btn_Last = ":" '定义页面跳转输入框和Go按钮的样式 Const Ipt_Style = "font-family: Verdana; font-size: 10px; height: 15px; border: 1px solid #666666" '类代码的开始标志 Class SplitPage '定义私有变量 Private PageCount, myCon, myRs, mySQL, CurrentPage, TotalNumber, URL, Params, FileName, myPageSize, myStyle '显示页面信息,可以根据需要修改 Private Function ShowPageInfo() Dim str_tmp str_tmp = "共" & TotalNumber & "条记录 每页" & myPageSize & "条 这是第" & CurrentPage & "/" & PageCount & "页" ShowPageInfo = str_tmp End Function '页码跳转输入框 Private Function Page_Input() Page_Input = " " End Function '页码跳转Go按钮 Private Function Page_Button() Page_Button = " " End Function '页码跳转选择列表 Private Function Page_Select() Dim str_tmp, i str_tmp = " 转到第页" Page_Select = str_tmp End Function '显示翻页(myStyle表示导航栏样式1~8) Public Sub ShowPage() Dim i, wrapstr1,wrapstr2,pagestr if TotalNumber>0 then wrapstr1 = "
" end if '手机端特殊处理,不要外层包含元素 if myStyle>=6 then Response.Write pagestr else Response.Write wrapstr1 & pagestr & wrapstr2 end if End Sub '数据显示页面通过该函数取得Rs对象,然后自定义显示方式 Public Function Rs() On Error Resume Next Set myRs = Server.CreateObject("ADODB.RecordSet") myRs.PageSize = myPageSize myRs.Open mySQL, myCon, 1 If err then Response.Write "