How to send a PUT/DELETE request in jQuery?

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

GET:$.get(..)

POST:$.post()..

What about PUT/DELETE?

13条回答
  •  醉话见心
    2020-11-22 13:08

    You should be able to use jQuery.ajax :

    Load a remote page using an HTTP request.


    And you can specify which method should be used, with the type option :

    The type of request to make ("POST" or "GET"), default is "GET".
    Note: Other HTTP request methods, such as PUT and DELETE, can also be used here, but they are not supported by all browsers.

提交回复
热议问题