當前位置:
首頁 >
Thymeleaf设置属性值
發布時間:2025/3/20
18
豆豆
生活随笔
收集整理的這篇文章主要介紹了
Thymeleaf设置属性值
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
th:attr
設置屬性值
參考文檔
設置單個屬性值
<form action="subscribe.html" th:attr="action=@{/subscribe}"><fieldset><input type="text" name="email" /><input type="submit" value="Subscribe!" th:attr="value=#{subscribe.submit}"/></fieldset> </form>設置多個屬性值
中間使用逗號分隔
<img src="../../images/gtvglogo.png" th:attr="src=@{/images/gtvglogo.png},title=#{logo},alt=#{logo}" />總結
以上是生活随笔為你收集整理的Thymeleaf设置属性值的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Dubbo负载均衡原理
- 下一篇: Spring boot的put请求