thymeleaf项目路径

来源:互联网 发布:广电网络设备有哪些 编辑:程序博客网 时间:2024/09/21 09:26

1、在页面中

th:action="@{/edit.html}" />

<a th:href="@{edit.html}"   />
2、在javascript中
[javascript] view plain copy
  1. <script th:inline="javascript">  
  2.     function edit() {  
  3.         var link = /*[[@{/edit.html}]]*/ 'test';  
  4.         document.getElementById("user_form").action = link;  
  5.     }  
  6. </script>  
原创粉丝点击