Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/87.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Css html 5 style=“background color:yellow;”或style=“background color:FF0000;”不更改表行的颜色_Css_Html_Jsp - Fatal编程技术网

Css html 5 style=“background color:yellow;”或style=“background color:FF0000;”不更改表行的颜色

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

在基于行值true/false条件的jsp页面中,我试图更改行的颜色。在这里,当值为true时,行没有颜色,但当值为false时,则为黄色。我得到表的真值或假值,但颜色不变

     <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我无法用小提琴回答