[求助]动态生成下拉菜单的问题
我在页面中想让用户进行积分修改的操作,有两个文件,1.asp为界面,他从数据库中读取用户的账户名称和信息,并且每行显示一个,另外每行还有一个下拉菜单和一个文本筐以及一个 “执行“文字连接。
2.asp为从1.asp接收相关传递值,进行数据库操作,想请问下如何在1.asp中单击每一行的“执行”的时候,将本行的下拉菜单选择情况以及文本筐所填数字传递到2.asp!具体情况请见:www.ruixuewangluo.cn/shjs/admin/jifen.asp
1.asp的代码如下:
<% DIM rs,sql
set rs=server.CreateObject("adodb.recordset")
sql="select * from admin order by admin_id desc"
rs.open sql,conn,3,2
rs.PageSize=8
%>
<p>
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<link href="../css/CSS.css" rel="stylesheet" type="text/css">
<p>
<table width="100%" border="0">
<tr>
<td width="14%"> <div align="center" class="style1">帐户名</div></td>
<td width="44%"> <div align="center">积分数</div></td>
<td width="42%"> <div align="center" class="style1"></div>
<div align="center" class="style1"> 操作 </div></td>
</tr>
<tr>
<td colspan="3"><hr align="center" width="100%" color="#0000FF"></td>
</tr>
<%if rs.eof and rs.bof then%>
<tr>
<td colspan="3"><div align="center">没有任何记录 </div>
<div align="center"></div></td>
</tr>
<%else
pagecount=rs.PageCount
page=int(request.QueryString ("page"))
if page<=0 then page=1
if request.QueryString("page")="" then
page=1
end if
rs.AbsolutePage=page
for i=1 to rs.pagesize
if rs.eof then
exit for
end if
%>
<tr>
<td> <div align="center"><%=rs("admin_name")%></div></td>
<td><div align="center"><%=rs("admin_total")%></div></td>
<td>
<div align="center">
<select name="select">
<option selected>请选择操作类型</option>
<option value="1"><font color="#FF0000">加积分</font></option>
<option value="2"><font color="#FF0000">减积分</font></option>
</select>
<input name="textfield" type="text" value="加减的积分数" size="13" height="18">
<a href="action.asp"><strong><font size="3">操作</font></strong></a></div>
<div align="justify"></div>
<div align="center"> </div>
<div align="center"></div>
<div align="center"> </div></td>
</tr>
<tr>
<td colspan="3"><div align="center">
<hr align="center" width="100%" color="#FFFF00">
</div></td>
</tr>
<%rs.movenext
next
end if%>
<tr>
<td colspan="3"><div align="center"></div>
<div align="center">当前页<b><%=page%>/<%=rs.PageCount%></b> - 共有<b><%=rs.recordcount%></b>条记录 - 每页<b><%=rs.pagesize%></b>条 <a href="?page=1">首页</a> |
<%if page >1 then%>
<a href="?page=<%=page -1%>">上页</a>
|
<%end if%>
<%if page<pagecount then%>
<a href="?page=<%=page +1%>">下页</a>|
<%end if%>
<a href="?page=<%=rs.PageCount%>">尾页</a>
|转到第
<select name="sel_page" onChange="javascript:location=this.options[this.selectedIndex].value;">
<%
for i = 1 to rs.PageCount
if i = page then%>
<option value="?page=<%=i%>" selected><%=i%></option>
<%else%>
<option value="?page=<%=i%>"><%=i%></option>
<%
end if
next
%>
</select>
页 </div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table>
<%set rsb=nothing
set rs=nothing
conn.close%>
</body>
</html>
[此贴子已经被作者于2007-10-12 12:32:32编辑过]