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

ASP提交INPUTtext数组,POST方法如何获取其取?
如:
<form   name= "thisform "   method= "post "   action= "?action=sentdata ">
x1: <input   name= "txtgroup "   type= "text ">
x2: <input   name= "txtgroup "   type= "text ">
x3: <input   name= "txtgroup "   type= "text ">
x4: <input   name= "txtgroup "   type= "text ">
x5: <input   name= "txtgroup "   type= "text ">
x6: <input   name= "txtgroup "   type= "text ">
<input   name= "modifydata "   type= "button "   value= "提交 ">
</form>
<%
x(i)=request.form(       '这个地方怎么写啊

'然后把x(i)的值又要斌给rs(i)
'不然如果提交页的元素很多,代码会累死人
%>

分虽不多,但本来一定结贴,谢了。


------解决方案--------------------
<%
'不好意思,没看清LZ的题目
x = Request.Form( "txtgroup ")
value=split(x, ", ")
for i=0 to Ubound(value)
rs(i) = value(i)
'response.write(value(i)& " <br> ")
next

%>


------解决方案--------------------
1、textgroup的值POST前对“,”要进行编码,否则会出现SPLIT错误。
2、value=split(x, ", ")注意逗号后有一个空格。
其他按照melodywithme的做法应该可以的