上篇解决问题的代码如下
<%call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center class='zhengwen'>")
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
Dim t
t = ""
if pro_type <> 0 then t = t & "pro_type=" & pro_type&"&"
if pro_type2 <> 0 then t = t & "pro_type2=" & pro_type2&"&"
if pro_name <> "无" then t = t & "keyword=" & Server.URLEncode(pro_name)&"&"
Response.Write("<table " & Table_style & ">" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?"&t&"Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=right>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & t & "Page=1"& ">首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & t &"Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & t & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & t &"Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "种商品" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT NAME=page SIZE=1 Maxlength=5 VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT type=submit style=""font-size: 9pt"" value=GO class=b2>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>
现在的问题是怎么把红色这段用列表/菜单代替,就是不用手动输入页码,直接点列表即可
希望能赐教
[此贴子已经被作者于2007-8-18 23:02:37编辑过]