Skip to content

Commit

Permalink
속성 값 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
kiteB committed Sep 18, 2021
1 parent 4d34cfc commit 734cf56
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ public String operation(Model model) {
return "basic/operation";
}

@GetMapping("/attribute")
public String attribute() {
return "basic/attribute";
}

@Data
static class User {

Expand Down
20 changes: 20 additions & 0 deletions thymeleaf-basic/src/main/resources/templates/basic/attribute.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<h1>속성 설정</h1>
<input type="text" name="mock" th:name="userA" />
<h1>속성 추가</h1>
- th:attrappend = <input type="text" class="text" th:attrappend="class='large'" /><br/>
- th:attrprepend = <input type="text" class="text" th:attrprepend="class='large'" /><br/>
- th:classappend = <input type="text" class="text" th:classappend="large" /><br/>

<h1>checked 처리</h1>
- checked o <input type="checkbox" name="active" th:checked="true" /><br/>
- checked x <input type="checkbox" name="active" th:checked="false" /><br/>
- checked=false <input type="checkbox" name="active" checked="false" /><br/>
</body>
</html>

0 comments on commit 734cf56

Please sign in to comment.