呵呵~
我是朋友介绍这里来的!
所以现在遇到if函数我不会,请教一下大家!
我现在遇到一段代码,但是老是提示语句错误!
晕~
代码是:if instr(url,"article")>0 then
Sql="select title from [sms] Where ID="&ID
elseif
Sql="select name from [wjfile] where soft=1"
elseif
Sql="select name from [wsfile] Where ID="&ID
elseif
Sql="select name from [wjfile] where picsc=2"
end if
这样加,应该没错啊!
怎么会错误呢?
晕~
大家能帮我解决一下嘛?
还有那里有asp if语句教程呢?我去也顺便去学习下!

解决方案 »

  1.   

    http://www.bianceng.cn/webkf/asp/200802/7401.htm
      

  2.   

    if instr(url,"article")>0 then 
    Sql="select title from [sms] Where ID="&ID 
    elseif 其他條件1,如xx=1
    Sql="select name from [wjfile] where soft=1" 
    elseif  其他條件1,如xx=2
    Sql="select name from [wsfile] Where ID="&ID 
    else
    Sql="select name from [wjfile] where picsc=2" 
    end if 
      

  3.   

    回2楼,不行啊!
    提示如下:
    Microsoft VBScript 编译器错误 错误 '800a03ea' 语法错误 /getbook.asp,行 40 
    elseif
    ------^
      

  4.   

    是你走错地方了,这是asp.net版,不是asp版,asp.net和asp根本就不是一回事,我八九年前也搞asp,asp.net一出来我就转asp.net了,再没接触asp,asp技术现在很少有人用了。
      

  5.   

    可是我根本就找不到asp版啊!
      

  6.   

    看CSDN论坛左边的导航菜单:+Web开发
      ASP