$.ajax({
url : "/",
//传输类型为post
type: "POST",
//需要使用JSON序列化参数
data: JSON.stringify([
{id: 1, name: "Shahed"},
{id: 2, name: "Hossain"}
]),
//类型设置为以下
contentType: "application/json; charset=utf-8",
//数据类型为json
dataType : "json",
success : function(){
console.log("Pure jQuery Pure JS object");
}
});
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交