![]() |
#2
apull2010-05-12 23:54
|
A网页中的部分代码:

....
rs.open sql,conn,1,1
if not rs.EOF or rs.BOF then
%>
<tr bgcolor=LawnGreen><td WIDTH=45%>产品型号</td><td WIDTH=25%>产品名称</td><td WIDTH=20%>价格</td><td WIDTH=15%>数量</td></tr>
<%
do while not rs.EOF or rs.BOF
%>
<tr bgcolor=LightGoldenrodYellow><td><%=rs("name")%></td>
<td><%=rs("publish")%></td>
<td><%=rs("price")%>元</td>
<td><INPUT type="text" name=<%=rs("id")%>></td>
<% rs.movenext
loop
end if
....
A网页的主要功能是,客户端填写所需求的产品数量.rs.open sql,conn,1,1
if not rs.EOF or rs.BOF then
%>
<tr bgcolor=LawnGreen><td WIDTH=45%>产品型号</td><td WIDTH=25%>产品名称</td><td WIDTH=20%>价格</td><td WIDTH=15%>数量</td></tr>
<%
do while not rs.EOF or rs.BOF
%>
<tr bgcolor=LightGoldenrodYellow><td><%=rs("name")%></td>
<td><%=rs("publish")%></td>
<td><%=rs("price")%>元</td>
<td><INPUT type="text" name=<%=rs("id")%>></td>
<% rs.movenext
loop
end if
....
B网页中的部分代码:

....
rs.open sql,conn,1,1
curid=0
if not rs.EOF or rs.BOF then
%>
<tr bgcolor=LawnGreen><td WIDTH=45%>手机型号</td><td WIDTH=25%>生产厂家</td><td WIDTH=15%>价格</td><td WIDTH=15%>数量</td></tr>
<%
do while not rs.eof
curid=curid+1
if isnumeric(request(curid))<>0 then
%>
<tr bgcolor=LightGoldenrodYellow><td><%=rs("name")%></td>
<td><%=rs("publish")%></td>
<td><%=rs("price")%>元</td>
<td><%if request(curid)<>"" then
Response.Write request(curid)
else
Response.write "0"
end if %>件
</td></tr>
<%
end if
rs.movenext
loop
....
rs.open sql,conn,1,1
curid=0
if not rs.EOF or rs.BOF then
%>
<tr bgcolor=LawnGreen><td WIDTH=45%>手机型号</td><td WIDTH=25%>生产厂家</td><td WIDTH=15%>价格</td><td WIDTH=15%>数量</td></tr>
<%
do while not rs.eof
curid=curid+1
if isnumeric(request(curid))<>0 then
%>
<tr bgcolor=LightGoldenrodYellow><td><%=rs("name")%></td>
<td><%=rs("publish")%></td>
<td><%=rs("price")%>元</td>
<td><%if request(curid)<>"" then
Response.Write request(curid)
else
Response.write "0"
end if %>件
</td></tr>
<%
end if
rs.movenext
loop
....
B网页是接收A网页中的数量部分来显示,并确认.
我现在疑问的是curid=curid+1 是怎样让 request(curid)达到获取A网页中输入的数量的.
我是新手,学习没多久,所以还请详细讲解.谢谢!
[ 本帖最后由 shcnlm 于 2010-5-12 21:58 编辑 ]