关于request.form问题(错误:函数需要字符串输入)

来源:百度知道 编辑:UC知道 时间:2024/07/02 11:38:04
Request 对象, ASP 0102 (0x80004005)
函数需要字符串输入。
/Untitled-5.asp, 第 13 行
我的意思是,在表单上输入年龄和岁数。再根绝输入条件输出再输出response.Write里面内容

<%
dim sex,age

if request.form (sex)="男" then
if request.form (age<8) then
response.Write("小弟弟")
else
if request.form (age>=8 and age<=15) then
response.Write("小男孩")
else
if request.form(age>=16 and age<=24) then
response.Write("小伙子")
else
if request.form(age>=25 and age<=45) then
response.Write("青年男子")
else
if request.form(age>=46 and age<=55) then
response.Write("中年男子")
else
if request.form(age>=56 and age<=80 )then
response.Write("老爷爷")
else
if request.form(age>80) then
response.Write("老寿星")
end if
end if

Reqeust.Form("表单项名")
不是你的Request.Form(变量名)
正确的做法是:
Age=Request.Form("Age") '注意两个Age的意义不一样,前者是变量,后者是提交表单中的表单项的名称

呵呵,帮不了你了,尤其是ASP的对象。