所以我想用一个正文(比如file, file2, file3
)和像action=delete
之类的参数发一个http请求如何使用jquery发出这样的请求?
答案 0 :(得分:2)
使用url
和files
与body:
$.ajax({
url: 'someurl' + '?action=delete',
type: 'POST',
data: requestbodyhere,
success: function(responseData){
}
});
答案 1 :(得分:1)
您想要发帖吗?你可以使用Ajax做到这一点:
jQuery.ajax({
type: 'POST',
url: url,
data: {
file1:'file1',
flie2:'file2'
},
success: function(response) {
//in response you have the answer from the server as a string
}
});