为什么传递值不变呢??????????????求救阿

来源:百度知道 编辑:UC知道 时间:2024/06/06 14:03:13
vote.asp
<%
sql = "Select * From vote "
set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, conn, 1, 1
i=0
do while not (rs.eof or err)

%>
<form name="form" method="post" action="vote0.asp?id=<%=rs("id")%>">
<table border=1 bordercolor="#99FF99" width="100%" align=center cellspacing=0>
<tr>
<td width="23%" class="STYLE1"><span class="STYLE4">项目:<%=rs("title")%></span></td>
<td width="23%" class="STYLE1"><span class="STYLE4">参与人数:<%=rs("titlenumber")%></span></td>
<td colspan="3" class="STYLE1">编号:<%=rs("id")%></td>
</tr>
<tr>

问题可能是因为你的</form>应该在循环体内,应该放在
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
之前,因为你的<form>在循环体内,所以你得到的表单总是第一个表单,所以总是1

do while not (rs.eof or err)
把这句改改do while not rs.eof