读书人

lt;c:ifgt;用法,该如何解决

发布时间: 2012-01-09 21:05:41 作者: rapoo

<c:if>用法
<c:if test="${restore=!null}">
<span class="STYLE7">回复内容:<%=restore%></span></c:if>

我的意思是 如果回复内容为空的话 就不显示 回复内容,我是这么写的 但是不对

[解决办法]

[解决办法]
<c:if test="${restore=!null}">
!= 写反了

[解决办法]
<c:if test="${empty restore}">
<span class="STYLE7">回复内容: <%=restore%> </c:if>

试试这样,呵呵

[解决办法]
<c:if test="${restore!= null || restore!='null'}">
<span class="STYLE7">回复内容: <%=restore%> </c:if>


我也不知道对不对
[解决办法]
呵呵,不用这么麻烦了 ,不需要if标签
直接:
<span class="STYLE7">回复内容:${restore}

读书人网 >Java Web开发

热点推荐