<input name="Input" onclick="oCopy(this)" <%if Recordset1.Fields.Item("drama_hits")>=3 then %>>class="text_160_hong"<%else%>class="text_160"<%end if%> value=<%=(Recordset1.Fields.Item("drama_title").Value)%>
/>
解读:
一、<%if Recordset1.Fields.Item("drama_hits")>=3 then class="text_160_hong"
当记录集的"drama_hits"大于等于3时class定义为text_160_hong
二、<%else%>class="text_160"
否则class="text_160"
"<%end if%>应该是if then else end if的语句格式,它应该是结束语
本文解析了一段使用条件语句设置HTML元素样式的代码片段,详细介绍了如何根据记录集中'drama_hits'字段的值来改变显示文本的颜色。

1046

被折叠的 条评论
为什么被折叠?



