How can I send a http delete request from browser?

后端 未结 6 1946
一整个雨季
一整个雨季 2020-12-10 02:01

Is there a way to send a DELETE request from a website, using xmlhttprequest or something similar?

6条回答
  •  孤街浪徒
    2020-12-10 02:26

    As someone mentioned above, jQuery will do this for you, via the following syntax:

    $.ajax({
        type: "DELETE",
        url: "delete_script.php",
        data: "name=someValue",
        success: function(msg){
            alert("Data Deleted: " + msg);
        }
    });
    

提交回复
热议问题