搞了一天脑袋大了,请教高人
列子能实现的:
if tpid="2" then
im=1
end if
if tpid="8" then
im=2
end if
if tpid="4" then
im=3
end if
if tpid="3" then
im=4
end if
if tpid="6" then
im=5
end if
if tpid="7" then
im=6
end if
%>
<td width="550" height="35">
<img src="../images/g<%=im%>.gif" width="273" height="36"></td>
能看不明白吧
我现在的问题是想把
if tpid="2" then
im=<font color=#996600>[行]</font>
end if
if tpid="8" then
im=<font color=#009966>[购]</font>
end if
if tpid="4" then
im=3
end if
if tpid="3" then
im=4
end if
if tpid="6" then
im=5
end if
if tpid="7" then
im=6
end if
%>
<td class="20"> <%=im%> <a href="<%=path%>guide/guideplay.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%if i<5 then response.Write("<font color="&rs("ntitlecolor")&">") end if%><%=title%><%if i<5 then response.Write("</font>") end if%> </A></td>
意思就是说当TPID=2时 代码中就显示这样了:
<td class="20"> <font color=#996600>[行]</font> <a href="<%=path%>guide/guideplay.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%if i<5 then response.Write("<font color="&rs("ntitlecolor")&">") end if%><%=title%><%if i<5 then response.Write("</font>") end if%> </A></td>
按列子是可以实现im=数字时候实现的图片! 但代码怎么实现啊 我不会 请教大家!
有1 2 3 4 5 这五个栏目,但我发个文章 在首页就显示(首页调用五个栏目最新文章),但不知道是那个栏目里的,现在想在前面做个标记,就知道这个文章属于那个栏目的了,
<tr>
<td class="news"><font color=#CC3399>[娱]</font> <a href="news/newsplay.asp?id=150" target="_blank" title="海南岛欢乐节开幕现场"><font color=#FF0000>海南岛欢乐节开幕现场</font></a></td>
</tr>
这是别人的 就是就是所这个文章属于娱乐 栏目里的,,这个不是调用数据库的 就根据TPID来显示的!