回 帖 发 新 帖 刷新版面

主题:新人总很晕自检查N便没错可一浏览照样错误!高手挺我

<body>
<% 
dim vvs,ubs
ubs="男"
vvs=30
  if ubs "男" then
    if vvs<8 then
  response.Write("小弟弟")
else
  if vvs>=8 and vvs<=15 then
    response.Write("小男孩")
else
  if vvs>=16 and vvs<=24 then
    response.Write("小伙子")
else
  if vvs>=25 and vvs<=45 then
    response.Write("青年男子")
else
  if vvs>=46 and vvs<=55 then
    response.Write("中年男子")
else
  if vvs>=56 and vvs<=80 then
    response.Write("老爷爷")
else
  if vvs>81 then 
     response.Write("老寿星")
end if
 end if
   end if
    end if
  end if
   end if
else
  if vvs<8 then
    response.Write("小妹妹")
else
  if vvs>=8 and vvs<=15 then
    response.write("小女孩")
else
  if vvs>=15 and vvs<=24 then
    response.Write("小姑娘")
else
  if vvs>=25 and vvs<=45 then
    response.write("青年女子")
else
  if vvs>=46 and vvs<=55 then
    response.Write("中年女子")
else
  if vvs>=56 and vvs<=80 then
    response.Write("老奶奶")
else
  if vvs>81 then
   response.Write("寿星老")
 end if
 end if
   end if
    end if
  end if
   end if
   end if
 %>
</body>

回复列表 (共5个回复)

沙发

if ubs "男" then  =号?
if endif 排锯尺型看一下是否缺

板凳

浏览器提示啥错误信息?
是否 如楼上所说 真的是缺了 “=”号?

3 楼

谢谢你的要求我全部改了!还是错误呵呵!后来发现问题所在了
天地我发现不是这个问题引起的!!!呵呵

我把这段改了就能浏览正确了

错误的(以前):

else
  if vvs>81 then 

response.Write("寿星老")

正确的(改后):

else
  if vvs>81 then response.Write("寿星老")

4 楼

那么长,应select case语名比较好

5 楼

这样:

if vvs>81 then response.Write("寿星老")

或者:

if vvs>81 then 
response.Write("寿星老")
end if

我来回复

您尚未登录,请登录后再回复。点此登录或注册