一、th:text字符串拼接

user.name从后台传来的变量,${user.name}获得变量值。文本链接:用“+”符号,也可以用“|”符号。

若user.name="张三",解析结果为:<span>Welcome,张三</span>
<span th:text="'Welcome,'+${user.name}"> <span th:text="|Welcome,
${user.name}|">
二、th:action字符串拼接

若user.userId=1,解析结果为:<form action="/user/1"></form>
<form th:action="@{'/user/'+${user.userId}}"></form> <form
th:action="@{/user/{userId}(userId=${user.userId})}"></form>

友情链接
KaDraw流程图
API参考文档
OK工具箱
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:[email protected]
QQ群:637538335
关注微信