1. 程式人生 > >jsp中for迴圈中El表示式${}長度判斷和擷取

jsp中for迴圈中El表示式${}長度判斷和擷取

<c:choose>
<c:when test="${fn:length(s.name)>30}">
${fn:substring(s.name, 0, 30)}...
</c:when>
<c:otherwise>${s.name}</c:otherwise>
</c:choose>