<c:if test="${fn:length(newslist.title)>11 }">
<!-- 判断新闻标题是否大于11,如果是就执行以下语句 -->
<tr>
<td width="14"><img src="image/index_main_19.jpg" width="14" height="14" /></td>
<td height="17" title=${newslist.title }>${fn:substring(newslist.title, 0, 11)}...</td>
</tr>
</c:if>
EL判断字符串的长度和得到固定的长度
最新推荐文章于 2024-10-30 12:23:03 发布