<c:if test="${fn:length(o.title)>10}">
${fn:substring(o.title, 0, 10)} ...
</c:if>
<c:if test="${fn:length(o.title)<=10}">
${o.title}
</c:if>
java 当超过一定限制的字数时采用省略号
最新推荐文章于 2021-11-13 15:23:00 发布
<c:if test="${fn:length(o.title)>10}">
${fn:substring(o.title, 0, 10)} ...
</c:if>
<c:if test="${fn:length(o.title)<=10}">
${o.title}
</c:if>