如何从浏览器发送http删除请求? [英] How can I send a http delete request from browser?
本文介绍了如何从浏览器发送http删除请求?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法从网站发送DELETE请求,使用 xmlhttprequest
或类似的东西?
Is there a way to send a DELETE request from a website, using xmlhttprequest
or something similar?
推荐答案
如上所述, jQuery 将执行此操作您,通过以下语法:
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);
}
});
这篇关于如何从浏览器发送http删除请求?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文