asp怎樣獲得動態生成文本框的值
通過form的action屬性調用這個asp文件,例如:
<form name= "form1 " action= "*.asp ">
<%for i=1 to 5 %>
<input type= "text " name= "uid <%=i%> ">
<input type= "text " name= "name <%=i%> ">
我要調用的asp文件怎麼樣才能獲得具體的uid,name的值
要調用的asp文件主要實現的功能是將得到的uid,name 控件的值寫入DataBase
------解决方案--------------------1.asp 你拷贝后运行一下,有没取出值?~~!
-------------
<form action= "1.asp " method= "post " name= "form1 ">
<%for i=1 to 5 %>
<input type= "text " name= "uid <%=i%> " value= " <%=Request.Form( "uid "&i)%> " id= "uid <%=i%> ">
<input type= "text " name= "name <%=i%> " value= " <%=Request.Form( "name "&i)%> " id= "name <%=i%> "> <br />
<%next%>
<input type= "submit " name= "tj " value= "提交 ">
</form>
<%
dim arr(),arr2(),num
num=request.form.count-1
Redim arr(num),arr2(num)
for i=1 to num
arr(i)=Request.Form(i)
arr2(i)=Request.Form.key(i)
response.Write arr2(i)& "=============== "& arr(i)& " <br> "
next
%>