日期:2014-05-17  浏览次数:21229 次

虽然简单但是写不来,请教大家
页面里面比如有:
<input   name= "A "   value= "1 "   type= "text "   />
<input   name= "A "   value= "2 "   type= "text "   />
<input   name= "A "   value= "3 "   type= "text "   />
<input   name= "A "   value= "4 "   type= "text "   />
<input   name= "A "   value= "5 "   type= "text "   />
请问如何在提交后   在处理数据入库的页面怎么写?我下面写得好像不对

  strA=   trim(request( "A "))

if   year_work.length   >   0   then
    sql1   =   "select   *   from   Persons "
    rs1.open   sql1,con,1,3
  for   i=0   to   strA.length                
  rs1.addnew()
        rs1( "PeopleCardId ")=strA(i)      
  rs1.update()
        next
        rs1.close()
end   if


------解决方案--------------------
<input name= "A " value= "1 " type= "text " />
<input name= "B " value= "2 " type= "text " />
<input name= "C " value= "3 " type= "text " />
<input name= "D " value= "4 " type= "text " />
<input name= "E " value= "5 " type= "text " />
<%
strA= trim(request( "A "))
strb= trim(request( "B "))
strC= trim(request( "C "))
strD= trim(request( "D "))
strE= trim(request( "E "))
'下面addnew()的时候对应增加就OK。
if year_work.length > 0 then
sql1 = "select * from Persons "
rs1.open sql1,con,1,3
for i=0 to strA.length
rs1.addnew()
rs1( "PeopleCardId ")=strA(i)
rs1.update()
next
rs1.close()
end if
%>
------解决方案--------------------
既然是一样的,那就split分割吧
------解决方案--------------------
顶~楼上的 在提交前调用javascript用|分割

ASP用split( "| ")返回数组
------解决方案--------------------
<%
i=1
for i=1 to 5
%>
<input name= "A <%=i%> " value= " <%=i%> " type= "text " />
<%
next
%>


<%
a=1
for a=1 to 5
ab=reqeust.form( "A "&a)
新增语句
next
%>