日期:2014-05-17  浏览次数:21000 次

求!如何在分页里加跳转?
我有一段分页的代码,想添加跳转到某一页的功能,
我不知道怎么修改,请高手帮忙!先谢谢啦
原代码如下:

<%
url=Request.ServerVariables( "SCRIPT_NAME ")
function   fy()
dim   temp
for   each   name1   in   Request.form
if   name1 <> "count "   then
temp=temp& "& "&name1& "= "&Request.Form(name1)
end   if
next
for   each   name1   in   Request.QueryString
if   name1 <> "count "   then
temp=temp& "& "&name1& "= "&Request.QueryString(name1)
end   if
next
fy=temp
end   function
%>
<a   href= " <%=url%> ?count=1 <%=fy()%> "> 首   页 </a>   <a   href= " <%=url%> ?count= <%=count-1%> <%=fy()%> "> 上一页 </a>   第   <%=count%>   页   <a   href= " <%=url%> ?count= <%=count+1%> <%=fy()%> "> 下一页 </a>   <a   href= " <%=url%> ?count= <%=PageCountx%> <%=fy()%> "> 尾   页 </a> ,共   <%=PageCountx%>   页

------解决方案--------------------
后面加一个 <select> 就可以了
比如:
<select name= "sel_page " onChange= "javascript:location=this.options[this.selectedIndex].value; ">
<%
for i = 1 to rsp.PageCount
if i = intpage then%>
<option value= " <%=url%> ?count= <%=i%> "selected> <%=i%> </option>
<%else%>
<option value= " <%=url%> ?count= <%=i%> "> <%=i%> </option>
<%
end if
next
%>
</select> 页
------解决方案--------------------
<a href= " <%=url%> ?count=1 <%=fy()%> "> 首 页 </a> <a href= " <%=url%> ?count= <%=count-1%> <%=fy()%> "> 上一页 </a> 第 <%=count%> 页 <a href= " <%=url%> ?count= <%=count+1%> <%=fy()%> "> 下一页 </a> <a href= " <%=url%> ?count= <%=PageCountx%> <%=fy()%> "> 尾 页 </a> ,共 <%=PageCountx%> 页 跳转到 <input type= "text " style= "width:30px " value= " <%=count%> " id= "txtPage "> 页 <input type= "button " onclick= 'window.location.href= "?page= "+document.all.txtPage.value ' value= "go " />