Lia*_*ake 2 html java thymeleaf spring-boot
(我已经在谷歌上查看过,这里..并且无法找到可以帮助我的答案)。
目标:以可点击的网络链接形式输入网站 - 链接以 varchar(100) 形式从数据库检索
尝试了各种不同的解决方案..没有任何运气 - 也许你们中的一个人可以帮助我?:)。先感谢您。
<table class="table table-striped table-bordered table-hover">
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Address</th>
<th>City</th>
<th>Zip</th>
<th>Website</th>
<th>Email</th>
<th>Phone</th>
<th>Location</th>
<th>Agelimit</th>
</tr>
</thead>
<tbody>
<tr th:each="sps: ${sp}">
<td th:text="${sps.venueId}"/>
<td th:text="${sps.name}"/>
<td th:text="${sps.address}"/>
<td th:text="${sps.city}"/>
<td th:text="${sps.zip}"/>
<td th:text="${sps.website}"/>
<td th:text="${sps.email}"/>
<td th:text="${sps.phone}"/>
<td th:text="${sps.location}"/>
<td th:text="${sps.ageLimit}"/>
</tr>
</tbody>
</table>
Run Code Online (Sandbox Code Playgroud)
您可以在 Thymeleaf 中使用任何类型的标签。这是你想要的吗?
<td>
<a th:href="${sps.website}" th:text="${sps.website}" target="_blank" />
</td>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8124 次 |
| 最近记录: |