Thymeleaf th:action
th:attr 任何属性值
<form action="subscribe.html" th:attr="action=@{/subscribe}">
<fieldset>
<input type="text" name="email" />
<input type="submit" value="Subscribe me!" th:attr="value=#{subscribe.submit}"/>
</fieldset>
</form>
多个属性一起设置,用逗号隔开
<img src="../../images/gtvglogo.png" th:attr="src=@{/images/gtvglogo.png},title=#{logo},alt=#{logo}" />
设置指定属性
复制代码
th:abbr th:accept th:accept-charset
th:accesskey th:action th:align
th:alt th:archive th:audio
th:autocomplete th:axis th:background
th:bgcolor th:border th:cellpadding
th:cellspacing th:challenge th:charset
th:cite th:class th:classid ...
复制代码
<input type="submit" value="Subscribe me!" th:value="#{subscribe.submit}"/>
<form action="subscribe.html" th:action="@{/subscribe}">
<li><a href="product/list.html" th:href="@{/product/list}">Product List</a></li>
Thymeleaf th:action的更多相关文章
- SpringBoot整合Thymeleaf
一个整合Thymeleaf与Mybatis的CRUD例子 整合Mybatis例子 一.添加maven依赖 <dependency> <groupId>org.springfra ...
- springData Jpa 快速入门
前言: 数据持久化的操作,一般都要由我们自己一步步的去编程实现,mybatis通过我们编写xml实现,hibernate也要配置对应的xml然后通过创建session执行crud操作.那么有没有这样一 ...
- 报错Error resolving template template might not exist or might not be accessible解决方案
"C:\Program Files\Java\jdk1.8.0_144\bin\java" "-javaagent:D:\IntelliJ IDEA Community ...
- SPRING IN ACTION 第4版笔记-第六章RENDERING WEB VIEWS-006- 使用thymeleaf(TemplateResolver、SpringTemplateEngine、ThymeleafViewResolver、th:include、th:object、th:field="*{firstName}")
一.在Spring中使用thymeleaf的步骤 1.配置 In order to use Thymeleaf with Spring, you’ll need to configure three ...
- spring boot(四):thymeleaf使用详解
在上篇文章springboot(二):web综合开发中简单介绍了一下thymeleaf,这篇文章将更加全面详细的介绍thymeleaf的使用.thymeleaf 是新一代的模板引擎,在spring4. ...
- Thymeleaf+Spring整合
前言 这个教程介绍了Thymeleaf与Spring框架的集成,特别是SpringMvc框架. 注意Thymeleaf支持同Spring框架的3.和4.版本的集成,但是这两个版本的支持是封装在thym ...
- Thymeleaf 常用属性
Thymeleaf 常用属性 如需了解thymeleafThymeleaf 基本表达式,请参考<Thymeleaf 基本表达式>一文 th:action 定义后台控制器路径,类似<f ...
- Thymeleaf基本知识
Thymeleaf是个XML/XHTML/HTML5模板引擎,可以用于Web与非Web应用. Thymeleaf的主要目标在于提供一种可被浏览器正确显示的.格式良好的模板创建方式,因此也可以用作静态建 ...
- SPRING + THYMELEAF 配置
1.使用的是Spring EL而不是Ognl.2.访问上下文的Bean用${@myBean.doSomething()}3.th:field,th:errors,th:errorclass用于form ...
随机推荐
- springboot1.5.4 idea 自动保存编译更新
maven dependencies增加 <dependency> <groupId>org.springframework.boot</groupId> < ...
- AOSP编译
AOSP编译 1 编译环境Win10系统安装VMplayer14,主机16G内存,I3-4170 ,虚拟机ubuntu-16.04.1-desktop-amd64,12G内存. 2 软件安装sudo ...
- 《java虚拟机》----java内存模型与线程
No1. No2. java内存模型规定了所有的变量都存储在主内存中(Main Memory)中 每条线程还有自己的工作内存(Working Memory) 线程的工作内存中保存了被该线程使用到的变量 ...
- 《大话设计模式》--UML图
类图分三层: 第一层:类的名称,如果是抽象类,就用斜体显示 第二层:类的特性,通常是字段和属性 第三层:类的操作,通常是方法或行为 接口图:第一行是接口名称,第二行是接口方法 继承:用空心三角形+实线 ...
- Array.reduce()方法的使用
起因是学习异步函数的串行与并行写法时,发现reduce方法可以简化写法,然后看到一篇博客里面这样一段代码: var array = [1, [2, [3, 4], 5], 6]; function f ...
- java抽象类、多态、接口
抽象类 抽象类的产生 当编写一个类时,我们往往会为该类定义一些方法,这些方法是用来描述该类的功能具体实现方式,那么这些方法都有具体的方法体. 但是有的时候,某个父类只是知道子类应该包含怎么样的方法,但 ...
- go chapter 11 初始化 map 数组
// 初始化 map m1 = make(map[string]string) // 初始化 数组 var array3 = []int{9, 10, 11, 12} var a [4]int a[0 ...
- 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 xor (根号分治)
xor There is a tree with nn nodes. For each node, there is an integer value a_iai, (1 \le a_i \le ...
- Yii apache配置站点出现400 Bad Request 的解决方法
<VirtualHost *:80> ServerName localhost ServerAlias localhost DocumentRoot "/www/frogCms/ ...
- 51Nod1962 区间计数
这题与之前那道区间最值的题非常类似,依旧是二分区间,然后统计跨过中间点的区间贡献. 我们要选出小于等于和小于的,这样就可以算出相等的区间长了. 复杂度O(nlogn) By:大奕哥 #include& ...