码上敲享录 > thymeleaf > thymeleaf截取字符串,拼接字符串

thymeleaf截取字符串,拼接字符串

上一章章节目录下一章 2019-06-22已有6180人阅读 评论(0)

thymeleaf截取字符串,拼接字符串的写法如下:

<a th:id="${signId}+m"  th:text="${#strings.abbreviate(signTitle,10)}" th:title="${signTitle}">
</a>

解释:

th:text="${#strings.abbreviate(signTitle,10)}"  显示10位文字,多余的以省略号显示

th:id="${signId}+m" 在字符串后拼接字符m

th:title="${signTitle}" 解决如果显示部分字符串,当鼠标移到字符上面就显示全部字符


向大家推荐《Activiti工作流实战教程》:https://xiaozhuanlan.com/activiti
8

有建议,请留言!

  • *您的姓名:

  • *所在城市:

  • *您的联系电话:

    *您的QQ:

  • 咨询问题:

  • 提 交