DELETE:
$.ajax({
url: '/script.cgi',
type: 'DELETE',
success: function(result) {
// Do something with the result
}
});
PUT:
$.ajax({
url: 'script.php',
type: 'PUT',
success: function( response ) {
}
});

本文介绍如何利用jQuery的$.ajax方法发送HTTP DELETE及PUT请求,并提供了具体的代码示例。DELETE请求用于删除资源,而PUT请求则用于更新现有资源。
519





