How to send a PUT/DELETE request in jQuery?

前端 未结 13 2367
别跟我提以往
别跟我提以往 2020-11-22 12:54

GET:$.get(..)

POST:$.post()..

What about PUT/DELETE?

13条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-22 13:21

    You could use the ajax method:

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

提交回复
热议问题