Css html 5 style=“background color:yellow;”或style=“background color:FF0000;”不更改表行的颜色
在基于行值true/false条件的jsp页面中,我试图更改行的颜色。在这里,当值为true时,行没有颜色,但当值为false时,则为黄色。我得到表的真值或假值,但颜色不变Css html 5 style=“background color:yellow;”或style=“background color:FF0000;”不更改表行的颜色,css,html,jsp,Css,Html,Jsp,在基于行值true/false条件的jsp页面中,我试图更改行的颜色。在这里,当值为true时,行没有颜色,但当值为false时,则为黄色。我得到表的真值或假值,但颜色不变 <c:choose> <c:when test="${Cvalue == true}"> <tr> <td class="firstColumn"><c:out
<c:choose>
<c:when test="${Cvalue == true}">
<tr>
<td class="firstColumn"><c:out
value="${Cvalue}" /></td>
</tr>
</c:when>
<c:otherwise>
<tr style="background-color: yellow;" >
<td class="firstColumn"><c:out
value="${Cvalue}" /></td>
</tr>
</c:otherwise>
</c:choose>
您的tr在“否则”条款中不接近。请尝试以不同的方式缩进行。如果你注意到了,你可能会注意到丢失的。对不起,这只是一个打字错误。我想补充一点,在问题中,我们可以提供一个fiddle@MHHasnain我无法用小提琴回答