分页中select标签点击页面转向的问题

来源:百度知道 编辑:UC知道 时间:2024/05/30 05:05:18
<%
dim i,intPage,page,pre,last,filepath'定义变量
set rs = server.CreateObject("adodb.recordset")'创建对象
sql="select * from user order by user_ID desc"'定义SQL语句
rs.PageSize = 20 '这里设定每页显示的记录数
rs.CursorLocation = 3
rs.Open sql,conn,0,2,1 '这里执行你查询SQL并获得结果记录集
pre = true
last = true
page = trim(Request.QueryString("page"))'变量是跳转页面时的值

if len(page) = 0 then
intpage = 1
pre = false
else
if cint(page) =< 1 then
intpage = 1
pre = false
else
if cint(page) >= rs.PageCount then
intpage = rs.PageCount
last = false
else
intpage = cint(page)
end if
end if
end if
if not rs.eof then
rs.AbsolutePage = intpage
end if
%>
循环体开始:
<%
for i=1 to rs.PageSize
if rs.EOF or rs.BOF then exit for
%>
..................
...............

看一下下面的资料

第一个是简单的
<form name="form1" method="post" action="">
<Select onchange="window.open(this.options[this.selectedIndex].value)">
<option>请选择连接目标</option>
<option value="http://www.h3bbs.com" target="_blank">和山论坛</option>
<option value="http://www.zjblog.com" target="_blank">浙江博客</option>
<option value="http://blog.h3bbs.com" target="_blank">天涯博客</option>
<option value="http://www.xiasha.com" target="_blank">下沙网</option>
</Select>
&l