首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

<c:if>用法,该如何解决

2012-01-09 
c:if用法c:if test${restore!null}span classSTYLE7回复内容:%restore%/span/c:if我

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

热点排行