반응형

출처: http://stackoverflow.com/questions/2153917/how-to-send-a-put-delete-request-in-jquery


$.get()하고 $.post()가 있어서 당연히 $.put()이나 $.delete()도 있을 줄 알았는데 아니였다.



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

$.ajax({
    url: '/script.cgi',
    type: 'PUT',
    success: function(result) {
        // Do something with the result
    }
});
이런 식으로 $.ajax() 메서드를 활용해야 put과 delete 호출을 할 수 있었다.
반응형
Posted by 애콜라이트
l

free counters