<style type="text/css">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head><body><% 
If request("action")="ckaddtem" then
for i=1 to request.Form("ChangboxID").count

Huohao=trim(replace(request.Form("Huohao")(i),",",""))
pcs_out=trim(replace(request.Form("pcs_out")(i),",",""))
ChangboxID=request.Form("ChangboxID")(i)'打钩选择才修改对应数据

if ChangboxID="y" then
'  sql="select * from 表B where Huohao='"&Huohao&"'"
'  set rs2=server.CreateObject("adodb.recordset")
'  rs2.open sql,conn,1,3
'  rs2("Huohao")=Huohao
'  rs2("pcs_out")=pcs_out
'  rs2.update
'  rs2.close
'  set rs2=nothing
 end if

wr=wr&"<br/>"&Huohao
next

response.Write("你已选取修改的货号有<br/>")&wr

end if
%>
<table id="myTable" width="27%" border="0" align="center" cellpadding="2" cellspacing="1"><form action="?action=ckaddtem" method="post" name="f1" id="f1"><tr bgcolor="#D4D4D4" >
  <td width="10%" height="25"  align="center" nowrap bgcolor="#EFEFEF" class="forumRowHighlight" >货号</td>
  <td width="10%"  align="center" nowrap bgcolor="#EFEFEF" class="forumRowHighlight" >出货支数</td>
  
    
  <td width="36%"  align="left" nowrap bgcolor="#EFEFEF" class="forumRowHighlight" style="padding-left:15px;">打钩后才出货</td>
</tr><tr align="center" ><td height="25" align="center" nowrap ><input name="Huohao" type="text" id="Huohao" value="1" size="15" title="名称不能更改"></td>
<td align="left" nowrap style="padding-left:10px;"><input name="pcs_out" type="text" id="pcs_out" value="0" size="10"></td>
<td align="left" nowrap style="padding-left:55px;"><input name="ChangboxID" type="checkbox" id="ChangboxID" value="y"></td>
</tr><tr align="center" ><td height="25" align="center" nowrap ><input name="Huohao" type="text" id="Huohao" value="2" size="15" title="名称不能更改"></td>
<td align="left" nowrap style="padding-left:10px;"><input name="pcs_out" type="text" id="pcs_out" value="15" size="10"></td>
<td align="left" nowrap style="padding-left:55px;"><input name="ChangboxID" type="checkbox" id="ChangboxID" value="y"></td>
</tr><tr align="center" ><td height="25" align="center" nowrap ><input name="Huohao" type="text" id="Huohao" value="3" size="15" title="名称不能更改"></td>
<td align="left" nowrap style="padding-left:10px;"><input name="pcs_out" type="text" id="pcs_out" value="30" size="10"></td>
<td align="left" nowrap style="padding-left:55px;"><input name="ChangboxID" type="checkbox" id="ChangboxID" value="y">
  <input type="submit" name="Submit" value="提交" /></td>
</tr>
</form>
</table><p>  <span class="STYLE1">我想实现当控件ChangboxID打钩后,才修改数据库对应货号的出库支数,不打钩就不修改(注意:只用后面打钩决定是否修改数据库对应的出货支数,因此不用管出货支数的变化值)。
各位有什么高见?帮我想个办法啊,谢谢</span>!<br />
<br />
因为我用我的源代码,直邮当全部打钩选择时,才能正确修改对应的数据库出后支数pcs_out,如果只选择某其中2个,就会出现修改对应数据列不符的现象,不知道哪里出错了,会不会是因为全部打钩和部分打钩的控件ChangboxID的数组个数不一样呢?还是数组对应不一致呢?</p>
</body>