分享你我的心得.
共乘一片美好网络.

jsp页面判断

第一种判断

<c:if test=”${fn:length(item.creditorName)>’15’}”>${fn:substring(item.creditorName, 0, 15)}…</c:if>

第二种判断

<c:choose>
<c:when test=”${条件}”>
情况1:
</c:when>
<c:when test=”${条件}”>
情况2:
</c:when>
<c:otherwise>
否则。。。。。
</c:otherwise>
</c:choose>

例如:

<font color=<c:choose><c:when test="${fn:substring(tbSysOrderItem.grossprofit, 0, 1)=='-'}">#008000</c:when><c:otherwise>#FF0000</c:otherwise></c:choose>>${tbSysOrderItem.grossprofit}</font>
赞(0)
未经允许不得转载:小叶白龙博客 » jsp页面判断
分享到: 更多 (0)

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址