jQuery AJAX call有一个类型参数,允许指定异步调用的方法(GET / POST / PUT / DELETE);文件规定:
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.
这对现代浏览器意味着什么?我可以指望jQuery AJAX进行完全RESTful的调用,它依赖于PUT和DELETE动词吗?
解决方法
是. $.ajax使肮脏的工作允许PUT和DELETE.
在这里你可以找到更多的信息:Are the PUT,DELETE,HEAD,etc methods available in most web browsers?