关于request.form问题(错误:函数需要字符串输入)
Request 对象, ASP 0102 (0x80004005) 函数需要字符串输入。
/Untitled-5.asp, 第 13 行
我的意思是,在表单上输入年龄和岁数。根据输入表单里年龄和性比来判断输出小妹妹还是小弟弟等
<%
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
end if
end if
end if
end if
end if
else
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
end if
end if
end if
end if
end if
end if
%>
<form action="" method="post" >
<input name="age" type="text" value="" size="20">请输入内容
<br>
男<input name="sex" type="radio"value="男">
女<input name="sex" type="radio"value="女">
<br>
<input name="" type="submit" value="提交">
</form>