반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- java bigdecimal
- Python
- Airflow
- codebuild
- Flux
- docker
- aws cicd
- Kafka
- AWS CI/CD 구축하기
- COALESCE
- bootstrap
- PostgreSQL
- Jenkins
- codedeploy
- VPN
- node
- IntelliJ
- codedeploy error
- codepipeline
- SQL
- chartjs
- redis
- kubeflow
- or some instances in your deployment group are experiencing problems.
- Spring
- JavaScript
- aws
- Spring Error
- chart.js
- 도커
Archives
- Today
- Total
Small Asteroid Blog
thymeleaf onclick href 본문
728x90
thymeleaf 에서 컨트롤러에서 넘겨받은 URL 변수로
특정 태그에 onclick을 이용해 페이지 이동을 하고싶을때 (location.href 사용)
아래와 같이 사용하면 된다
<button type="button" id="btn" class="btn" th:onclick="'window.location.href=\''+@{/infolist}+'\''" >목록으로</button>
th:onclick="'window.location.href=\''+@{/list}+'\''"
th:onclick="'window.location.href=\''+@{/list}+'\''"
th:onclick="'window.location.href=\'/update?no=' + ${key} + '\''"
- Variable Expressions: ${...}
- Link URL Expressions: @{...}
728x90
반응형
'백엔드 > Spring' 카테고리의 다른 글
saveAndFlush() / save() (0) | 2021.05.17 |
---|---|
orphanRemoval (0) | 2021.05.17 |
[spring] postgresql 이름의 릴레이션(relation)이 없습니다 (0) | 2021.05.13 |
Unknown column '' in 'field list' on MySQL error (0) | 2021.05.04 |
Table 'DB_NAME.hibernate_sequence' doesn't exist (0) | 2021.04.28 |