日期:2014-05-18  浏览次数:20697 次

<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}