当前位置:K88软件开发文章中心编程语言AspAsp01 → 文章内容

当一个页面上有一百个表单

减小字体 增大字体 作者:佚名     来源:asp编程网  发布时间:2018-12-30 8:31:30

当一个页面上有一百个表单项,你是怎么获取上面的值勤的?
这是一段简单的代码,你试试这段代码,试过后,欢迎去贴吧说一下你的想法?
index.asp
<
form 
name="
form1"
 
method="
post"
 
action="
submit.asp"
>

 
 
 
用户名:<
input 
type="
text"
 
name="
username"
>
<
br>

密码:<
input 
type="
text"
 
name="
password"
>
<
br>

介绍:<
textarea 
name="
content"
 
cols="
20"
 
rows="
10"
>
<

textarea>
<
br>

性别:<
select 
name="
sex"
>

 
<
option 
value="
男"
>
男<
/option>

 
<
option 
value="
女"
>
女<
/option>

<
/select>
 

<
input 
type="
submit"
 
value="
提交"
 
name="
submit"
>
 

<
input 
type="
hidden"
 
name="
id"
 
value="
5"
>

 
 
 
<
/form>


submit.asp
<
%
For 
Each 

in 
request.Form 

 
 
 
response.write 
j&

#38
"
="
&

#38
request(j)&

#38
"
<
br>
"

Next
%>


当一个页面上有一百个表单