【Thymeleaf】thymeleaf中给input的value属性设置值

简介: 【Thymeleaf】thymeleaf中给input的value属性设置值
@GetMapping("/to_update_car{id}")
    public String UpdateCar(@PathVariable("id")String id, HttpSession session){
        Car now=cardao.FindById(id);
        System.out.println(now);
        System.out.println(id);
        session.setAttribute("update_car_pojo",id);
        return "redirect:/car_update";
    }
<input name="car_id" type="text" 
class="form-control" id="exampleInputName2" 
th:value="${session.update_car_pojo}"  >
目录
相关文章
freemarker中对null值的处理
官方文档 ​​​​​​FreeMarker 中文官方参考手册 (foofun.cn)
|
缓存 JavaScript 前端开发
SpringBoot——Thymeleaf中的th:inline(内敛文本text、内敛脚本javascript)
SpringBoot——Thymeleaf中的th:inline(内敛文本text、内敛脚本javascript)
2230 0
SpringBoot——Thymeleaf中的th:inline(内敛文本text、内敛脚本javascript)
|
11天前
thymeleaf中的判断总结
thymeleaf中的判断总结
11 0
|
8月前
|
JSON Java PHP
Spring Boot 一个接口同时支持 form 表单、form-data、json 优雅写法
网上很多代码都是千篇一律的 cvs,相信我只要你认真看完我写的这篇,你就可以完全掌握这个知识点,这篇文章不适合直接 cvs,一定要先理解。
|
7月前
|
JavaScript 前端开发
Thymeleaf属性值详解
Thymeleaf属性值详解
thymeleaf 的 th:each 标签示例
thymeleaf 的 th:each 标签示例
103 0
|
Java
Thymeleaf的常用属性和标准表达式
Thymeleaf的常用属性和标准表达式
150 0
|
移动开发 HTML5
如何去掉thymeleaf的严格的模板校验
如何去掉thymeleaf的严格的模板校验
146 0
|
索引
thymeleaf的th:each常见用法
thymeleaf的th:each常见用法 一.th:eath迭代集合用法: 是否选中 编号 姓名 年龄 编号 姓名 年龄 二.迭代下标变量用法: 状态变量定义在一个th:每个属性和包含以下数据: 1.当前迭代索引,从0开始。
4132 0