首页> 文章> 详情

thymeleaf textarea 赋值

教程分享 > Java教程 (6461) 2023-03-28 11:29:14
本文说一下在thymeleaf模板引擎中,如何给 textarea 赋值。
普通的input赋值我们是这样的
<input type="text" class="form-control" placeholder="搜索标题" name="searchTitle" th:value="${site.searchTitle}">
但是textarea标签的赋值方式并非上面这样,而是以下面的方式赋值:
<textarea name="searchDescription" type="text"  style="width: 100%;resize: none;" rows="3" class="form-control" placeholder="搜索描述" th:text="${site.searchDescription}"></textarea>

好了搞定!!!
https://www.leftso.com/article/716.html

相关文章
本文说一下在thymeleaf模板引擎中,如何给 textarea 赋值
SSH/SSM项目中如何集成thymeleaf?本文将讲解SSH/SSM项目中如何集成thymeleaf模板引擎
Thymeleaf 递归,Thymeleaf模板引擎递归展示如评论留言等场合适用
js/jQuery获取textarea的光标位置实现光标位置插入内容
thymeleaf模板 报错信息:​​​​​​​org.thymeleaf.exceptions.TemplateInputException: Error resolving template...
thymeleaf 设置不校验html标签
springboot 使用thymeleaf 模板引擎中url中的&引起的org.xml.sax.SAXParseException: 对实体 "uid" 的引用必须以 ';' 分隔符结尾。问题解决
ckeditor绑定keyup/keydown等事件实现一些功能,比如实时保存$(function(){//1编辑器初始化$('textarea#blog_content').ckeditor();
一、项目环境Spring Boot 2.1.2.RELEASEshiro-spring 1.4二、去掉URL jsessionid在shiro配置中,配置关闭url中显示sessionId ...
spring boot 开发技巧,在开发web项目中跳过thyemeleaf模板/js/css等缓存避免每次修改资源文件都需要重启服务器
Spring Boot 1.x升级到Spring Boot 2.0迁移指南
升级环境说明目前项目使用的2.3.7版本(自己感觉还行,但是官方已经停止支持了。)Spring Boot 官方支持情况spring boot 官方支持情况官方在今年8月就终止了对2.3.x的版本...
spring boot 导入本地jar包spring boot maven 打war包时候导入本地jar包
本文主要说明在spring mvc框架中如何接收前端发过来的集合对象和相关的处理。主要讲解两种方式,form表单提交方式和ajax提交的方式