1
To put it in context:
I have a "log" object, which was declared on an HTML page through Thymeleaf:
<html xmlns:th="http://www.thymeleaf.org" th:include="layout :: page">
...
<form class="form-inline" action="#" th:action="@{'log/'}" th:object="${log}" method="post">
In a certain part of the code is displayed the contents of this object, which is nothing more than a text "stringão":
<p th:utext="${log.content}">Log content</p>
Contents:
1. a
2. b
3. c
...
My doubt:
It is possible to place this content within a variable, and then use it within a . js?
Something like:
HTML:
<input type="hidden" th:value="${log.content}" >
Js:
var aux = $('input');
document.getElementById('content').innerHTML = aux.value;
My goal is to be able to handle this "log.content
" outside of HTML, it is possible?
You want to take the value of the Hidden input is this?
– LeAndrade
That, I want to put ${log.content} inside some variable and use it. I used <input> only as an example, but it would also do!
– David