在线求助!
<%
sum=0
T2=Split(request("T1"),",")
for i=0 to ubound(T2)
j=T2(i)
tempQuantity=Request("quantity"&j)
if request("danjia"&j)<>"" then
price=request("danjia"&j)
else if request("frist"&j)<>"" then
price=request("frist"&j)
else if request("heihutao"&j)<>"" then
price=request("heihutao"&j)
end if
end if
end if
sum=sum+tempQuantity*price
next
%>
<form name="formcheck" method="post" action="">
<%
id=request("id")
set rs=server.createobject("adodb.recordset")
sql="select * from th2 where classid="&id
rs.open sql,conn,1,1%>
<table width="626" border="0" align="center">
<tr>
<td width="71">
<div align="center">
<%if rs("classid")=1 then
response.write "厨房"
end if
if rs("classid")=2 then
response.write "卫生间1"
end if
if rs("classid")=3 then
response.write "卫生间2"
end if
if rs("classid")=4 then
response.write "主卧室"
end if
if rs("classid")=5 then
response.write "次卧室"
end if
if rs("classid")=6 then
response.write "书房"
end if
if rs("classid")=7 then
response.write "走入室衣柜"
end if
if rs("classid")=8 then
response.write "客厅及餐厅"
end if
if rs("classid")=9 then
response.write "阳台"
end if
if rs("classid")=10 then
response.write "五金件工程"
end if
if rs("classid")=11 then
response.write "其他工程"
end if
if rs("classid")=12 then
response.write "水工程"
end if
if rs("classid")=13 then
response.write "电工程"
end if
%>
</div>
</td>
<td width="265">
<div align="center">分部分工程名称</div>
</td>
<td width="40">
<div align="center">工程量</div>
</td>
<td width="24" style="display:none"> </td>
<td width="204">
<div align="center">客户选择</div>
</td>
</tr>
<%
i=0
do while not rs.eof
%>
<tr>
<td width="71">
<div align="center">
<input type=checkbox name="T1" value="<%=rs("id")%>">
</div>
</td>
<td width="265">
<div align="center"><%=rs("name")%>
</div>
</td>
<td width="40">
<input name="quantity<%=rs("id")%>" size="4">
</td>
<td width="24" style="display:none"> </td>
<td width="204">
<table width="100%" border="0">
<tr>
<td>
<div align="center">
<%
if rs("danjia")<>"" then%>
<input type=hidden name="danjia<%=rs("id")%>" value=<%=rs("danjia")%>>
<% end if
if rs("frist")<>"" then%>
<input type=radio name="frist<%=rs("id")%>" value=<%=rs("frist")%>>低档
<input type=radio name="frist<%=rs("id")%>" value=<%=rs("second")%>>中档
<input type=radio name="frist<%=rs("id")%>" value=<%=rs("third")%>>高档
<% end if
if rs("heihutao")<>"" then%>
<input type=radio name="heihutao<%=rs("id")%>" value=<%=rs("heihutao")%>>黑胡桃/泰柚
<input type=radio name="heihutao<%=rs("id")%>" value=<%=rs("baihutao")%>>白胡桃
<input type=radio name="heihutao<%=rs("id")%>" value=<%=rs("shuiquliu")%>>水曲柳
<%end if
%>
</div>
</td>
</tr>
</table>
</td>
</tr>
<%
i=i+1
rs.movenext
loop
rs.close
set rs=nothing
%>
<tr>
<td colspan=3>
<input type=submit value=计算>
:<%=sum%> </td>
<td colspan=2>
<input type= button value=关闭窗口 onclick="window.close();">
</td>
</tr>
</table>
</form>
师哥师姐们,帮小弟看一下,为什么那个price,和tempquantity怎么不随着i的变化而变化呢 ??