ajax中类型和方法之间的差异是什么
问题描述:
我已经根据自己的经验使用了两种东西
i的思维方法和类型都是 POST 和 GET 方法。
HI i have used both the things in my experience i was thinking method and type both are POST and GET methods.
但好像它们不相似。?
But seems like they are not similar.?
如果我使用输入
它正常工作序列化
表单数据..
if i use type
it is working i am serializeing
a form data..
如果我写方法
它不起作用可以解释它们之间的差异吗?
if i write method
it is not working can can anyone explain what is the diff between them..?
$.ajax({
url: "controller.php",
type: 'POST',
method: "POST",
dataType: "json",
});
帮助被挪用。
答
type(默认值:'GET')
类型:String
方法的别名。如果您使用1.9.0之前的jQuery版本,则应使用类型。
type (default: 'GET') Type: String An alias for method. You should use type if you're using versions of jQuery prior to 1.9.0.