如何在ajax调用中传递特殊字符变量i并在spring控制器中获取值。如果文件name="##@jsuduu"
function deleeteimg(){
var filename=$("#filenm").text();
alert(filename);
//var filename=$(this).attr("data-id");
var url="/myuploads/deleteFile.html?filename="filename;
$.ajax({
type: "GET",
url: url,
contentType: 'html',
success: function(response) {
window.location.href="/myuploads/showUploads.html";
}
});
}
Run Code Online (Sandbox Code Playgroud)