⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turnpage.asp

📁 一个互联网络公司网站源码
💻 ASP
字号:
          <%
'		currentPage=Request.QueryString("page")
'		if not isnumeric(currentPage) then
'			currentPage=1
'		end if
'		currentPage=cint(currentPage)
'		if currentPage<1 then
'			currentPage=1
'		end if
'		if currentPage>rs.pagecount then
'			currentPage=rs.pagecount
'		end if
'		PageCounts=rs.pagecount
'		recordCounts=Rs.RecordCount
'		if not rs.eof then
'			rs.absolutepage=currentPage
'		end if
		  
		  page_url=request.ServerVariables("URL")
		  pagename=right(page_url,len(page_url)-InstrRev(page_url,"/"))
		  querystr=trim(request.ServerVariables("QUERY_STRING"))
		  if instr(querystr,"page=") then
		  querystr=left(querystr,instr(querystr,"page=")-1)
		  elseif len(querystr)>0 then
		  querystr=querystr&"&" 
		  end if
		  for each item in request.Form
		  if request.Form(item)<>"" and request.Form(item)<>"搜索" then
		  formstr=formstr+item+"="+request.Form(item)+"&"
		  end if
		  next
		 %>
<div>
    <div style="float:left">
              当前<% if PageCounts > 0 then %> <%=currentPage%>/<%=PageCounts%>
              <%else%> 0/0
              <%end if%>页 
              共<%=recordCounts%>条记录
    </div>
    <div style="float:right">
    <%if currentPage<2 then %>
                首页 | 上页 |
                <%else%>
            <a href="<%=pagename%>?<%=querystr%><%=formstr%>page=1">首页</a> | <a href="<%=pagename%>?<%=querystr%><%=formstr%>page=<%=currentPage-1%>">上页</a> |
                <%end if%>
            <%if PageCounts-currentPage<1 then%>
                下页 | 尾页 |
                <%else%>
                <a href="<%=pagename%>?<%=querystr%><%=formstr%>page=<%=currentPage+1%>">下页</a> | <a href="<%=pagename%>?<%=querystr%><%=formstr%>page=<%=PageCounts%>">尾页</a> |
                <%end if%>
                转到第
                <select class="txt" name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;" id="Select1">
                  <%
           for i = 1 to PageCounts
           if i =currentPage then%>
                  <option value="<%=pagename%>?<%=querystr%><%=formstr%>page=<%=i%>" selected><%=i%></option>
                  <%else%>
                  <option value="<%=pagename%>?<%=querystr%><%=formstr%>page=<%=i%>"><%=i%></option>
                  <%end if
            next%>
                </select>
    </div>
</div>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -