php - Thymeleaf, table in Javascript -
i use thymeleaf print items(each has 3 values) database, html file is:
<!doctype html system "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd"> <html xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"/> <title>edycja miejsca</title> </head> <body> <div th:each="items : ${itemslist}"> <div th:object="${items}"> <p th:text="*{id}"/> <p th:text="*{name}"/> <p th:text="*{age}"/> </div> <br/> </div> </body> </html>
i try use autocomplete, local static table in javascript, mean:
var gifs = [ { value: 'android-explosion', data: 'ae' }, { value: 'ben-and-mike', data: 'bm' }, { value: 'book-dominos', data: 'bd' }, { value: 'compiler-bot', data: 'cb' }, { value: 'cowboy-coder', data: 'cc' }, { value: 'infinite-andrew', data: 'ia' } ]; $('#autocomplete').autocomplete({ lookup: gifs });
works want use autocomplite items database. how can use thymeleaf create dynamic table in javascript?
<script> var table = []; table.push[item]; </script>
Comments
Post a Comment