title: How to set variable in thymeleaf?
body: <p>I'm still looking for a way to set values ​​directly into JavaScript function param in thymeleaf. How to set <code>${variable}</code> to javascript function param directly?  Help me.</p>
  
  <pre><code>function **loadDetailView**(no){
   location.href = "/home/docs/holiday/detail-view/"+no; 
  }
  
  &lt;tbody id="docsTr"&gt;
  &lt;tr th:if="${size} == '0'"&gt;
    &lt;td colspan=3&gt;No data.&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr th:unless="${size} == '0'" th:each = "docs : ${list}"
  style="cursor:pointer;" onclick="**loadDetailView**(1)"&gt;
    &lt;td th:text="${docs.board_no}"&gt;1&lt;/td&gt;
    &lt;td th:text="${docs.name}"&gt;Brian&lt;/td&gt;
    &lt;td th:text="${docs.holiday_type}"&gt;Annual&lt;/td&gt;
  &lt;/tr&gt;
  &lt;/tbody&gt;
  </code></pre>