<style type="text/css">
.tdcolor td{
color: red;
}
</style>
<c:if test="${listR.ifOneDay == '1'}">
<tr bgcolor="#F4F4F4" class="tdcolor">
</c:if>
<c:if test="${listR.ifOneDay == '0'}">
<tr bgcolor="#F4F4F4" >
</c:if>
本文介绍了一种使用JSP实现页面元素样式的应用案例,并展示了如何根据条件来改变表格行的背景颜色及文字颜色。通过<c:if>标签进行判断,实现了根据不同条件渲染不同样式的表格行。
<style type="text/css">
.tdcolor td{
color: red;
}
</style>
<c:if test="${listR.ifOneDay == '1'}">
<tr bgcolor="#F4F4F4" class="tdcolor">
</c:if>
<c:if test="${listR.ifOneDay == '0'}">
<tr bgcolor="#F4F4F4" >
</c:if>

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