在Thymeleaf中,相当于JSP的
${pageContext.request.contextPath}/edit.html是@{/edit.html}查看Thymeleaf文档的此部分以获取更多详细信息
您的情况是:
<script th:inline="javascript"> function edit() { var link = 'test'; document.getElementById("user_form").action = link; }</script>本
语法使用Thymeleaf评估通过的Javascript使用的变量,而不会破坏脚本如果将静态加载地方。查看文档的此部分以获取更多详细信息


