1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

这种ASP条件语句如何写

Discussion in '后端开发' started by linsixi, Apr 29, 2009.

  1. linsixi

    linsixi New Member

    Joined:
    Sep 9, 2006
    Messages:
    7
    Likes Received:
    0
    原代码如下:<td><%if rs("typeid")=1 then response.write("办公台灯系列") else response.Write("餐厅吊灯系列") end if%></td>
    我想增加一个“现代灯饰系列”进去,
    我的代码如下:<td><%if rs("typeid")=1 then response.write("办公台灯系列") elseif rs("typeid")=2 then response.Write("餐厅吊灯系列") elseif rs("typeid")=3 then response.Write("客厅吸顶系列") end if%>

    ====================================
    则出现以下错误,请问如何解决。
    打开 127.0.0.1 主页,然后查找与所需信息相关的链接。
    HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
    Internet 信息服务

    --------------------------------------------------------------------------------

    技术信息(用于支持人员)

    错误类型:
    Microsoft VBScript 编译器错误 (0x800A0401)
    语句未结束
    /admin/Case_Manage.asp, line 50, column 48
    if rs("typeid")=1 then response.write("办公台灯系列") elseif rs("typeid")=2 then response.Write("餐厅吊灯系列") elseif rs("typeid")=3 then response.Write("客厅吸顶系列") end if
    -----------------------------------------------^


    浏览器类型:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TheWorld)

    网页:
    GET /admin/Case_Manage.asp
     
  2. 不学无术

    不学无术 Ulysses 的元神

    Joined:
    Aug 31, 2005
    Messages:
    16,714
    Likes Received:
    39
    把代碼分成多行寫吧。