我有一個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