首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

虽然简单但是写不来

2012-03-04 
虽然简单但是写不来,请教大家页面里面比如有:inputname A value 1 type text /inputname A

虽然简单但是写不来,请教大家
页面里面比如有:
<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
%>

热点排行