본문 바로가기
728x90
반응형

개발/html,Thymeleaf14

Uncaught SyntaxError: Invalid shorthand property initializer 함수를 선언하던 중 updateInfo :function (){ ....... } 을 updateInfo = function (){ ........ } 이라고 쓰면서 생긴 문제 Uncaught SyntaxError: Invalid shorthand property initializer 2021. 6. 8.
Thymeleaf 정리-2 [기본적인 표현방법] Thymeleaf 표현방법 지역변수(Local Variables) Thymeleaf에서 지역변수의 범위는 변수가 정의된 DOM을 포함한 하위의 DOM까지를 포함합니다. 예를 들면 다음과 같습니다. 1 2 3 4 5 Onions 2.41 cs 위의 내용은 each 속성을 사용하여 반복구문을 한것인데 prod는 tr를 포함하여 그 하위 태그에서만 사용 가능합니다. 위와 같은 반복문에서도 th:with 속성을 이용하여 지역변수를 사용할 수 있습니다. 1 2 3 4 5 6 The name of the first person is Tom. The name of the second person is Jeny. Colored by Color Scripter cs th:with문은 변수를 지정할 수 있으며 ',' 구분.. 2021. 5. 11.
[Thymeleaf] th:utext Thymeleaf 검색하면서 모르는 것 정리 th:utext 태그 escape하지 않고(escape : -> 로 표시) 그래도 나타내는 것 1 2 3 /* Java */ String message = "Hello World!"; model.addAttribute("message", message); 1 2 3 1 2 3 Hello World! Hello World! 2021. 5. 10.
Thymeleaf 정리-1 [기본적인 표현방법] Thymeleaf의 표현 방법 1. Variable Expressions : ${...} 해당 Context에 포함된 변수를 사용 1 Today is: 13 february 2011. cs 2. Select Variable Expressions : *{...} Context에 포함된 변수를 사용한는 걸 보면 1번과 표현방식이 동일하지만 가까운 DOM에 th:object가로 존재하는 변수가 있다면 그 변수값에 표함된 값을 나타냅니다.(property 나 map의 value와 같이) 1 2 3 4 5 6 Name: Sebastian. Surname: Pepper. Nationality: Saturn. Colored by Color Scripter cs 3. Message Expressions : #{...}.. 2021. 5. 6.
728x90
반응형