高分悬赏,VBSCRIPT if语句,谢谢各位

来源:百度知道 编辑:UC知道 时间:2024/06/09 04:57:38
<%
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%

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

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

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

15分也是高分悬赏?呵呵

提示的很明显了。

缺少语句 if

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