springboot thymeleaf常用标签
xmlns:th="http://www.w3.org/1999/xhtml"
<tr th:each="user,i : ${list}" th:class="${i.odd}?'odd'">
<td th:text="${user.username}"></td>
<td th:if="${user.sex}==1">男</td>
<td th:if="${user.sex}==0">女</td>
<td th:text="${user.phone}"></td>
<td th:text="${#dates.format(user.borthday, 'yyyy-MM-dd')}"></td>
<td>
<input type="button" value="删除" th:onclick="'getName(\''+${user.id}+'\')'">
</td>
</tr>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<!--数字循环-->
<!-- <tr class="pagination" th:each="i : ${#numbers.sequence(1, rows)}">
<td>[[${i}]]</td>
</tr>-->
<!--嵌套循环-->
<tr class="pagination" th:each="i : ${#numbers.sequence(1, rows)}">
<td th:each="deptDict,userStat : ${deptDicts}"
th:if="${userStat.index lt i*4 and userStat.index ge (i-1)*4}">
<input type="checkbox" th:value="${deptDict.deptCode}" name="deptCode">
<span th:text="${deptDict.deptName}"></span>
</td>
</tr>
springboot thymeleaf常用标签的更多相关文章
- thymeleaf常用标签
1. th:checked ,th:selected标签<input type="radio" value="M" name="gender&q ...
- thymeleaf 常用标签
1.th:field th:field="*{user.sex}" 此标签会自动填充数据,比如用户的性别 user.sex 如果不为空,则会自动勾选上 2.th:each=&qu ...
- SpringBoot入门系列(五)Thymeleaf的常用标签和用法
前面介绍了Spring Boot 中的整合Thymeleaf .不清楚的朋友可以看看之前的文章:https://www.cnblogs.com/zhangweizhong/category/16577 ...
- 4.Thymeleaf的常用标签
一.常用标签 二.foreach案例 1.创建项目 2. 创建Student.java package cn.kgc.pojo; /** * Created by Administrator on 2 ...
- SpringBoot 中常用注解@Controller/@RestController/@RequestMapping的区别
SpringBoot中常用注解@Controller/@RestController/@RequestMapping的区别 @Controller 处理http请求 @Controller //@Re ...
- SpringBoot thymeleaf模板版本,thymeleaf模板更换版本
SpringBoot thymeleaf模板版本 thymeleaf模板更换版本 修改thymeleaf模板版本 ================================ ©Copyright ...
- SpringBoot 中常用注解@Controller/@RestController/@RequestMapping介绍
原文 SpringBoot 中常用注解 @Controller/@RestController/@RequestMapping介绍 @Controller 处理http请求 @Controller / ...
- thymeleaf自定义标签方言处理
项目背景:springboot+thymeleaf thymeleaf两种方式处理自定义标签:AbstractAttributeTagProcessor 和 AbstractElementTagPro ...
- springBoot项目常用maven依赖以及依赖说明
springBoot项目常用maven依赖以及依赖说明 1:maven-compiler-plugin <build> <plugins> <!-- 指定maven编译的 ...
- springboot thymeleaf【转】【补】
thymeleaf模板 https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html 1.引入thymeleaf依赖 <!-- ...
随机推荐
- Spring Boot学习笔记(一)----概要与入门
本文来自博客园,作者:{张果},转载请注明原文链接:{SpringBoot学习笔记(一)--SpringBoot概要与快速入门} 一.Spring Boot概要 没有Spring Boot开发项目时各 ...
- SVN信息泄露漏洞
SVN信息泄露漏洞 目录 SVN信息泄露漏洞 1 SVN 简介 2 SVN目录 3 SVN信息泄露漏洞危害 4 漏洞利用 5 漏洞修复 1 SVN 简介 SVN(subversion)是一个开放源代码 ...
- 基线MRI与CRP是依那西普对nr-axSpA的疗效预测因素
基线MRI与CRP是依那西普对nr-axSpA的疗效预测因素 EULAR2015; PresentID: SAT0258 BASELINE MRI/CRP AS PREDICTORS OF RESPO ...
- 设备区分判断IPAD,H5,PC
HTML: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> < ...
- 通过反射机制简化 JDBC ResultSet 实体类的注入
提出问题 查询完某个表之后,一般都是把结果的每一个字段注入到一个实体类中.比如,数据库 users 表,查询出来的结果注入到 User 实体类中. 通过 while 遍历 ResultSet,把字段对 ...
- OpenLayers结合Turf实现空间运算
1. 引言 空间运算利用几何函数来接收输入的空间数据,对其进行分析,然后生成输出数据,输出数据为针对输入数据执行分析的派生结果. 可从空间运算中获得的派生数据包括: 作为输入要素周围缓冲区的面 作为对 ...
- Dev Express 框架自定义登录添加短信验证功能
需求:登录界面改成这样 记录一下过程,以便下次操作类似的步骤有遗忘,也与大伙儿分享下,如有不当之处请指出,感谢. 参考官网文档:https://docs.devexpress.com/eXpressA ...
- plesk 关闭维护模式
最近遇到访问plesk时出现maintanase mode模式,于是网上搜了答案都是老外的,且没有明确怎么解决,但可能造成这一问题的原因也很多,我这个是这么解决的,和大家分享下,希望可以起到一个思路引 ...
- JS下载单个图片、单个视频;批量下载图片,批量下载视频
下载单张图片 import JSZip from "jszip"; import FileSaver from "file-saver"; downloadIa ...
- sparksql的join有哪些及实现原理
sparksql的3种join实现 1.Broadcast Join (小表对大表) 在数据库的常见模型中(比如星型模型或者雪花模型),表一般分为两种:事实表和维度表. 维度表一般指固定的.变动较少的 ...