我有一个Thymeleaf模板此功能,使用该功能Thymeleaf:创建网址参数
function confirmDelete (id) {
var r = confirm("Are you sure to delete the item #" + id + " ?");
if (r == true) {
var link = /*[[@{/company/delete/}]]*/ + id;
window.location.href = link;
}
}
创建URL
/company/delete/id
但ID被忽略,产生的URL是/company/delete/
无编号
呃这部分注释掉了不是吗? – Andrew