青春正能量论文:高分悬赏,VBSCRIPT if语句,谢谢各位

来源:百度文库 编辑:高校问答 时间:2024/05/07 11:46:34
<%
housetype_id=Recordset1("housetype_id").Value
set Recordset2 = Server.CreateObject("ADODB.Recordset")
strSQL2="SELECT * FROM db_housetype where id="&housetype_id
Recordset2.Open strSQL2,conn,1,1
%>
<%if (Recordset2("id").Value="1") then%> <td align="center" bgcolor="#0000CC">
<%elseif (Recordset2("id")).Value="2"then%><td align="center" bgcolor="#FF0000">
<%elseif (Recordset2("id").Value="3") then%><td align="center" bgcolor="#FFFF00">
<%elseif (Recordset2("id").Value="4") then%> <td align="center" bgcolor="#FFFF00">
<%else (Recordset2("id").Value="5") then%> <td align="center" bgcolor="#FF0000">
<%end if%>

出错误提示:无法显示网页
试图访问的网页出现问题,无法显示。

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

请尝试执行下列操作:

单击刷新按钮,或稍后重试。

打开 localhost 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务

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

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

错误类型:
Microsoft VBScript 编译器错误 (0x800A0400)
缺少语句
/hotel/house/house_show.asp, line 82, column 5
else (Recordset2("id").Value="5") then
----^

哈哈,太粗心了,兄弟,就是误把elseif 写成else了,没有关系啦,小问题

明显提示错的地方少了个if

elseif(Recordset2("id").Value="5") then

15分也是高分悬赏?呵呵

提示的很明显了。

缺少语句 if

elseif(Recordset2("id").Value="5") then